pub trait WritableBytes: Debug {
// Required methods
fn len(&self) -> u64;
fn write_at(
&mut self,
offset: u64,
source: &[u8],
) -> Result<(), ByteAccessError>;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn as_contiguous_mut(&mut self) -> Option<&mut [u8]> { ... }
}Expand description
Bounded writable bytes exposed by a transport implementation.
Implementations may be segmented. Every operation is nonblocking and allocation-free.
Required Methods§
Provided Methods§
Sourcefn as_contiguous_mut(&mut self) -> Option<&mut [u8]>
fn as_contiguous_mut(&mut self) -> Option<&mut [u8]>
Borrow the complete destination when the concrete mapping is contiguous and stable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".