pub struct MemFs { /* private fields */ }Expand description
メモリの上のファイル置き場(パス → 中身)。wasm の既定の口で、ネイティブでも with で渡せる
(試験の偽のファイル・文字列から組む系)。パスは / 区切りの絶対パスに揃える(相対パスは / から)
Implementations§
Trait Implementations§
Source§impl Fs for MemFs
impl Fs for MemFs
fn read(&self, p: &Path) -> Result<Vec<u8>>
fn append(&self, p: &Path, b: &[u8]) -> Result<()>
fn is_file(&self, p: &Path) -> bool
fn is_dir(&self, p: &Path) -> bool
fn create_dir_all(&self, _p: &Path) -> Result<()>
fn remove_file(&self, p: &Path) -> Result<()>
fn rename(&self, a: &Path, b: &Path) -> Result<()>
fn canonicalize(&self, p: &Path) -> Result<PathBuf>
Auto Trait Implementations§
impl !Freeze for MemFs
impl RefUnwindSafe for MemFs
impl Send for MemFs
impl Sync for MemFs
impl Unpin for MemFs
impl UnsafeUnpin for MemFs
impl UnwindSafe for MemFs
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more