Struct openssh_sftp_protocol::request::Request
source · [−]pub struct Request<'a> {
pub request_id: u32,
pub inner: RequestInner<'a>,
}
Fields
request_id: u32
inner: RequestInner<'a>
Implementations
sourceimpl Request<'_>
impl Request<'_>
sourcepub fn serialize_write_request<'a, Container: SerBacker>(
serializer: &'a mut Serializer<Container>,
request_id: u32,
handle: Cow<'_, Handle>,
offset: u64,
data_len: u32
) -> Result<&'a mut Container>
pub fn serialize_write_request<'a, Container: SerBacker>(
serializer: &'a mut Serializer<Container>,
request_id: u32,
handle: Cow<'_, Handle>,
offset: u64,
data_len: u32
) -> Result<&'a mut Container>
The write will extend the file if writing beyond the end of the file.
It is legal to write way beyond the end of the file, the semantics are to write zeroes from the end of the file to the specified offset and then the data.
On most operating systems, such writes do not allocate disk space but instead leave “holes” in the file.
Responds with a crate::response::ResponseInner::Status
message.
The Write also includes any amount of custom data and its size is included in the size of the entire packet sent.
Return the serialized header (including the 4-byte size).
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnwindSafe for Request<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more