pub struct FileTree { /* private fields */ }Expand description
An in-memory package tree for WASM callers and fixtures.
Implementations§
Source§impl FileTree
impl FileTree
pub fn new() -> Self
pub fn from_files( files: impl IntoIterator<Item = (String, Vec<u8>)>, ) -> Result<Self, TreePathError>
pub fn insert( &mut self, path: impl Into<String>, bytes: impl Into<Vec<u8>>, ) -> Result<(), TreePathError>
pub fn files(&self) -> &BTreeMap<String, Vec<u8>>
Trait Implementations§
impl Eq for FileTree
impl StructuralPartialEq for FileTree
Auto Trait Implementations§
impl Forget for FileTree
impl Freeze for FileTree
impl RefUnwindSafe for FileTree
impl Send for FileTree
impl Sync for FileTree
impl Unpin for FileTree
impl UnsafeUnpin for FileTree
impl UnwindSafe for FileTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.