pub struct FilesystemRuntimeAdapter { /* private fields */ }Expand description
Routes the existing std.native.File promise API through an asynchronous
provider-neutral FilesystemHandle. Synchronous primitive methods remain
unavailable so remote and browser providers are never weakened to blocking
result semantics.
Implementations§
Source§impl FilesystemRuntimeAdapter
impl FilesystemRuntimeAdapter
pub fn new(handle: FilesystemHandle) -> Self
pub fn handle(&self) -> FilesystemHandle
pub fn close(&self) -> Promise
Trait Implementations§
Source§impl Clone for FilesystemRuntimeAdapter
impl Clone for FilesystemRuntimeAdapter
Source§fn clone(&self) -> FilesystemRuntimeAdapter
fn clone(&self) -> FilesystemRuntimeAdapter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl FileProvider for FilesystemRuntimeAdapter
impl FileProvider for FilesystemRuntimeAdapter
fn read_bytes(&self, _path: &str) -> Result<Vec<u8>, FileError>
fn write_bytes( &self, _path: &str, _bytes: Vec<u8>, _options: WriteOptions, ) -> Result<String, FileError>
fn exists_value(&self, _path: &str) -> Result<bool, FileError>
fn stat_entry(&self, _path: &str) -> Result<FileEntry, FileError>
fn entries_values(&self, _path: &str) -> Result<Vec<FileEntry>, FileError>
fn mkdir_path( &self, _path: &str, _options: MkdirOptions, ) -> Result<String, FileError>
fn delete_path( &self, _path: &str, _options: DeleteOptions, ) -> Result<String, FileError>
fn copy_path( &self, _source: &str, _target: &str, _options: CopyOptions, ) -> Result<String, FileError>
fn move_path( &self, _source: &str, _target: &str, _options: MoveOptions, ) -> Result<String, FileError>
fn temp_file_path( &self, _parent: &str, _options: TempFileOptions, ) -> Result<String, FileError>
fn temp_directory_path( &self, _parent: &str, _options: TempDirectoryOptions, ) -> Result<String, FileError>
fn read(&self, path: &str) -> Result<Promise, FileError>
fn write(&self, path: &str, bytes: Vec<u8>) -> Result<Promise, FileError>
fn write_with_options( &self, path: &str, bytes: Vec<u8>, options: WriteOptions, ) -> Result<Promise, FileError>
fn exists(&self, path: &str) -> Result<Promise, FileError>
fn stat(&self, path: &str) -> Result<Promise, FileError>
fn entries(&self, path: &str) -> Result<Promise, FileError>
fn list(&self, path: &str) -> Result<Promise, FileError>
fn walk(&self, path: &str) -> Result<Promise, FileError>
fn mkdir(&self, path: &str) -> Result<Promise, FileError>
fn mkdir_with_options( &self, path: &str, options: MkdirOptions, ) -> Result<Promise, FileError>
fn delete(&self, path: &str) -> Result<Promise, FileError>
fn delete_with_options( &self, path: &str, options: DeleteOptions, ) -> Result<Promise, FileError>
fn copy( &self, source: &str, target: &str, options: CopyOptions, ) -> Result<Promise, FileError>
fn move_entry( &self, source: &str, target: &str, options: MoveOptions, ) -> Result<Promise, FileError>
fn temp_file( &self, parent: &str, options: TempFileOptions, ) -> Result<Promise, FileError>
fn temp_directory( &self, parent: &str, options: TempDirectoryOptions, ) -> Result<Promise, FileError>
fn resolve(&self, root: &str, path: &str) -> Result<String, FileError>
Auto Trait Implementations§
impl !RefUnwindSafe for FilesystemRuntimeAdapter
impl !Send for FilesystemRuntimeAdapter
impl !Sync for FilesystemRuntimeAdapter
impl !UnwindSafe for FilesystemRuntimeAdapter
impl Freeze for FilesystemRuntimeAdapter
impl Unpin for FilesystemRuntimeAdapter
impl UnsafeUnpin for FilesystemRuntimeAdapter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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