filesystem example (#2236)
This commit is contained in:
@@ -127,16 +127,20 @@ impl FileContents for VecFileContents {
|
||||
}
|
||||
}
|
||||
|
||||
struct VecFileContents {
|
||||
pub struct VecFileContents {
|
||||
content: Vec<u8>,
|
||||
}
|
||||
|
||||
impl VecFileContents {
|
||||
fn new() -> Self {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
content: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_content(content: Vec<u8>) -> Self {
|
||||
Self { content }
|
||||
}
|
||||
}
|
||||
|
||||
/// An `InMemoryFile` is a shared handle to some underlying data. The relationship is analagous to
|
||||
|
||||
Reference in New Issue
Block a user