pub struct SftpFs { /* private fields */ }Implementations§
Trait Implementations§
Source§impl RemoteFs for SftpFs
impl RemoteFs for SftpFs
Source§async fn read_batch(&self, paths: &[String]) -> Vec<Result<Vec<u8>>> ⓘ
async fn read_batch(&self, paths: &[String]) -> Vec<Result<Vec<u8>>> ⓘ
Read whole files. Implementations must issue every request before awaiting
any reply; doing otherwise silently reintroduces O(N) round trips.
Source§async fn read_ranges(&self, reqs: &[RangeReq]) -> Vec<Result<Vec<u8>>> ⓘ
async fn read_ranges(&self, reqs: &[RangeReq]) -> Vec<Result<Vec<u8>>> ⓘ
Read byte ranges. Chunking is the implementation’s business; what matters
here is that the whole set is issued together, so a one-megabyte range costs
one round trip rather than the thirty-two its chunks would suggest.
Source§async fn home(&self) -> Result<String>
async fn home(&self) -> Result<String>
The absolute path a fresh session starts in — the account’s home directory. Read more
Source§async fn append(&self, path: &str, bytes: &[u8]) -> Result<()>
async fn append(&self, path: &str, bytes: &[u8]) -> Result<()>
Append bytes to a file, creating it if absent. Read more
Source§async fn mkdirs(&self, path: &str) -> Result<()>
async fn mkdirs(&self, path: &str) -> Result<()>
Create a directory and every missing parent. Read more
Source§async fn list_dirs(&self, paths: &[String]) -> Vec<Result<Vec<Entry>>> ⓘ
async fn list_dirs(&self, paths: &[String]) -> Vec<Result<Vec<Entry>>> ⓘ
List several directories at once. One listing carries every entry’s attrs,
which is what removes per-file stat from the page path; batching the
listings is what holds a symlink check over a deep path at one round trip
rather than one per path component.
Source§fn round_trips(&self) -> u64
fn round_trips(&self) -> u64
Flushes issued so far. One flush is one remote round trip, so this is the
invariant made observable, and assertable in tests.
Auto Trait Implementations§
impl !RefUnwindSafe for SftpFs
impl !UnwindSafe for SftpFs
impl Freeze for SftpFs
impl Send for SftpFs
impl Sync for SftpFs
impl Unpin for SftpFs
impl UnsafeUnpin for SftpFs
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