Struct openssh_sftp_client::WriteEnd
source · [−]pub struct WriteEnd<Buffer: ToBuffer + 'static> { /* private fields */ }
Expand description
It is recommended to create at most one WriteEnd
per thread
using WriteEnd::clone
.
Implementations
Create a useable response id.
Return true if reserve succeeds, false otherwise.
Return true if reserve succeeds, false otherwise.
pub async fn send_open_file_request(
&mut self,
id: Id<Buffer>,
params: OpenFileRequest<'_>
) -> Result<AwaitableHandle<Buffer>, Error>
pub async fn send_open_file_request(
&mut self,
id: Id<Buffer>,
params: OpenFileRequest<'_>
) -> Result<AwaitableHandle<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_close_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_close_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>
) -> Result<AwaitableStatus<Buffer>, Error>
Cancel Safety
This function is not cancel safe
buffer
- If set toNone
or the buffer is not long enough, thenData::AllocatedBox
will be returned. ReturnData::Buffer
if not EOF, otherwise returnsData::EOF
.
Cancel Safety
This function is not cancel safe
pub async fn send_remove_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_remove_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_rename_request(
&mut self,
id: Id<Buffer>,
oldpath: Cow<'_, Path>,
newpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_rename_request(
&mut self,
id: Id<Buffer>,
oldpath: Cow<'_, Path>,
newpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_mkdir_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>,
attrs: FileAttrs
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_mkdir_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>,
attrs: FileAttrs
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_rmdir_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_rmdir_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_opendir_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableHandle<Buffer>, Error>
pub async fn send_opendir_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableHandle<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_readdir_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>
) -> Result<AwaitableNameEntries<Buffer>, Error>
pub async fn send_readdir_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>
) -> Result<AwaitableNameEntries<Buffer>, Error>
Return all entries in the directory specified by the handle
, including
.
and ..
.
The filename
only contains the basename.
Cancel Safety
This function is not cancel safe
pub async fn send_stat_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableAttrs<Buffer>, Error>
pub async fn send_stat_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableAttrs<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_lstat_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableAttrs<Buffer>, Error>
pub async fn send_lstat_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableAttrs<Buffer>, Error>
pub async fn send_fstat_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>
) -> Result<AwaitableAttrs<Buffer>, Error>
pub async fn send_fstat_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>
) -> Result<AwaitableAttrs<Buffer>, Error>
handle
- Must be opened withFileMode::READ
.
Does not follow symlink
Cancel Safety
This function is not cancel safe
pub async fn send_setstat_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>,
attrs: FileAttrs
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_setstat_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>,
attrs: FileAttrs
) -> Result<AwaitableStatus<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_fsetstat_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>,
attrs: FileAttrs
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_fsetstat_request(
&mut self,
id: Id<Buffer>,
handle: Cow<'_, Handle>,
attrs: FileAttrs
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_readlink_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableName<Buffer>, Error>
pub async fn send_readlink_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableName<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_realpath_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableName<Buffer>, Error>
pub async fn send_realpath_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableName<Buffer>, Error>
Cancel Safety
This function is not cancel safe
pub async fn send_symlink_request(
&mut self,
id: Id<Buffer>,
targetpath: Cow<'_, Path>,
linkpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_symlink_request(
&mut self,
id: Id<Buffer>,
targetpath: Cow<'_, Path>,
linkpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_limits_request(
&mut self,
id: Id<Buffer>
) -> Result<AwaitableLimits<Buffer>, Error>
pub async fn send_limits_request(
&mut self,
id: Id<Buffer>
) -> Result<AwaitableLimits<Buffer>, Error>
Return limits of the server
Precondition
Requires Extensions::limits
to be true.
Cancel safety
This function is not cancel safe
pub async fn send_expand_path_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableName<Buffer>, Error>
pub async fn send_expand_path_request(
&mut self,
id: Id<Buffer>,
path: Cow<'_, Path>
) -> Result<AwaitableName<Buffer>, Error>
This supports canonicalisation of relative paths and those that need tilde-expansion, i.e. “~”, “~/…” and “~user/…”.
These paths are expanded using shell-lilke rules and the resultant path
is canonicalised similarly to WriteEnd::send_realpath_request
.
Precondition
Requires Extensions::expand_path
to be true.
Cancel safety
This function is not cancel safe
pub async fn send_fsync_request(
&mut self,
id: Id<Buffer>,
handle: &[u8]
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_fsync_request(
&mut self,
id: Id<Buffer>,
handle: &[u8]
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_hardlink_requst(
&mut self,
id: Id<Buffer>,
oldpath: Cow<'_, Path>,
newpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_hardlink_requst(
&mut self,
id: Id<Buffer>,
oldpath: Cow<'_, Path>,
newpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
Precondition
Requires Extensions::hardlink
to be true.
Cancel safety
This function is not cancel safe
pub async fn send_posix_rename_request(
&mut self,
id: Id<Buffer>,
oldpath: Cow<'_, Path>,
newpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
pub async fn send_posix_rename_request(
&mut self,
id: Id<Buffer>,
oldpath: Cow<'_, Path>,
newpath: Cow<'_, Path>
) -> Result<AwaitableStatus<Buffer>, Error>
Precondition
Requires Extensions::posix_rename
to be true.
Cancel safety
This function is not cancel safe
Trait Implementations
Auto Trait Implementations
impl<Buffer> !RefUnwindSafe for WriteEnd<Buffer>
impl<Buffer> !UnwindSafe for WriteEnd<Buffer>
Blanket Implementations
Mutably borrows from an owned value. Read more