openssh_sftp_protocol::request

Struct Request

Source
pub struct Request<'a> {
    pub request_id: u32,
    pub inner: RequestInner<'a>,
}

Fields§

§request_id: u32§inner: RequestInner<'a>

Implementations§

Source§

impl Request<'_>

Source

pub fn serialize_write_request<Output: SerOutput>( serializer: &mut Serializer<Output>, request_id: u32, handle: Cow<'_, Handle>, offset: u64, data_len: u32, ) -> Result<[u8; 4]>

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).

  • serializer - must be empty

Trait Implementations§

Source§

impl<'a> Debug for Request<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for Request<'_>

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Request<'a>

§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.