pub struct WriteEnd<Buffer, Q, Auxiliary = ()> { /* private fields */ }
Expand description

It is recommended to create at most one WriteEnd per thread using WriteEnd::clone.

Implementations

Create a WriteEnd from SharedData.

Consume the WriteEnd and return the stored SharedData.

Return crate::Data::Buffer or crate::Data::AllocatedBox if not EOF, otherwise returns crate::Data::Eof.

Return all entries in the directory specified by the handle, including . and ...

The filename only contains the basename.

Does not follow symlink

  • handle - Must be opened with FileMode::READ.
  • handle - Must be opened with OpenOptions::write set.

Create symlink

Return limits of the server

Precondition

Requires Extensions::limits to be true.

This supports canonicalisation of relative paths and those that need tilde-expansion, i.e. “~”, “~/…” and “~user/…”.

These paths are expanded using shell-like rules and the resultant path is canonicalised similarly to WriteEnd::send_realpath_request.

Precondition

Requires Extensions::expand_path to be true.

Precondition

Requires Extensions::fsync to be true.

Precondition

Requires Extensions::hardlink to be true.

The server MUST copy the data exactly as if the client had issued a series of [RequestInner::Read] requests on the read_from_handle starting at read_from_offset and totaling read_data_length bytes, and issued a series of [RequestInner::Write] packets on the write_to_handle, starting at the write_from_offset, and totaling the total number of bytes read by the [RequestInner::Read] packets.

The server SHOULD allow read_from_handle and write_to_handle to be the same handle as long as the range of data is not overlapping. This allows data to efficiently be moved within a file.

If data_length is 0, this imples data should be read until EOF is encountered.

There are no protocol restictions on this operation; however, the server MUST ensure that the user does not exceed quota, etc. The server is, as always, free to complete this operation out of order if it is too large to complete immediately, or to refuse a request that is too large.

Precondition

Requires Extensions::copy_data to be true.

For openssh-portable, this is available from V_9_0_P1.

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.

This function is only suitable for writing small data since it needs to copy the entire data into buffer.

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.

This function is only suitable for writing small data since it needs to copy the entire data into buffer.

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.

This function is only suitable for writing small data since it needs to copy the entire data into buffer.

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.

This function is zero-copy.

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.

This function is zero-copy.

Methods from Deref<Target = SharedData<Buffer, Q, Auxiliary>>

Returned the auxiliary data.

Create a useable response id.

Return true if reserve succeeds, false otherwise.

Return true if reserve succeeds, false otherwise.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.