pub struct MemoryRemoteClient { /* private fields */ }Expand description
A deterministic in-memory client useful for host integration tests and browser adapters that have not yet bound a real transport.
Implementations§
Source§impl MemoryRemoteClient
impl MemoryRemoteClient
pub fn new() -> Self
pub fn with_capabilities(capabilities: FilesystemCapabilities) -> Self
pub fn unauthenticated(self) -> Self
pub fn with_unverified_host_key(self) -> Self
pub fn insert(&self, path: &str, bytes: Vec<u8>) -> Result<(), FileError>
pub fn provider(&self) -> &MemoryFileProvider
Trait Implementations§
Source§impl Clone for MemoryRemoteClient
impl Clone for MemoryRemoteClient
Source§fn clone(&self) -> MemoryRemoteClient
fn clone(&self) -> MemoryRemoteClient
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 Default for MemoryRemoteClient
impl Default for MemoryRemoteClient
Source§impl RemoteFilesystemClient for MemoryRemoteClient
impl RemoteFilesystemClient for MemoryRemoteClient
fn authenticated(&self) -> bool
Source§fn host_key_verified(&self) -> bool
fn host_key_verified(&self) -> bool
SFTP clients must override this with their host-key verification result.
fn capabilities(&self) -> FilesystemCapabilities
fn stat(&self, path: &str) -> Result<FilesystemEntry, FileError>
fn read(&self, path: &str) -> Result<Vec<u8>, FileError>
fn write( &self, path: &str, bytes: Vec<u8>, options: WriteOptions, _mutation: &FilesystemMutationContext, ) -> Result<FilesystemMutation, FileError>
fn entries_page( &self, path: &str, request: &FilesystemPageRequest, ) -> Result<FilesystemEntryPage, FileError>
fn mkdir( &self, path: &str, options: MkdirOptions, _mutation: &FilesystemMutationContext, ) -> Result<FilesystemMutation, FileError>
fn delete( &self, path: &str, options: DeleteOptions, _mutation: &FilesystemMutationContext, ) -> Result<FilesystemMutation, FileError>
fn copy( &self, source: &str, target: &str, options: CopyOptions, _mutation: &FilesystemMutationContext, ) -> Result<FilesystemMutation, FileError>
fn move_entry( &self, source: &str, target: &str, options: MoveOptions, _mutation: &FilesystemMutationContext, ) -> Result<FilesystemMutation, FileError>
fn close(&self) -> Result<(), FileError>
Source§fn transport_verified(&self) -> bool
fn transport_verified(&self) -> bool
HTTPS/WebDAV clients must override this when certificate or endpoint
verification is not guaranteed by the host transport.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryRemoteClient
impl !Send for MemoryRemoteClient
impl !Sync for MemoryRemoteClient
impl !UnwindSafe for MemoryRemoteClient
impl Freeze for MemoryRemoteClient
impl Unpin for MemoryRemoteClient
impl UnsafeUnpin for MemoryRemoteClient
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