pub struct Request<'a> {
pub request_id: u32,
pub inner: RequestInner<'a>,
}
Fields§
§request_id: u32
§inner: RequestInner<'a>
Implementations§
Source§impl Request<'_>
impl Request<'_>
Sourcepub fn serialize_write_request<Output: SerOutput>(
serializer: &mut Serializer<Output>,
request_id: u32,
handle: Cow<'_, Handle>,
offset: u64,
data_len: u32,
) -> Result<[u8; 4]>
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§
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> 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