pub struct FramedData {
pub data: Vec<ByteBuf>,
}
Expand description
Nix “framed data” stored in memory.
Nix has FramedSource
and FramedSink
for streaming large amounts of miscellaneous
data. They represent lists of byte buffers, and the wire format is:
- each byte buffer is represented as a length followed by a buffer of that length. The buffer is NOT padded, unlike everything else in this protocol.
- the list is terminated by an empty buffer (which is represented on the wire as a length of zero, followed by nothing).
The whole point of this is that it is big enough that you don’t want to hold it in
memory all at once. Therefore, this struct might not be ideal for “production” use;
see the stream
function instead.
Fields§
§data: Vec<ByteBuf>
Implementations§
Trait Implementations§
Source§impl Clone for FramedData
impl Clone for FramedData
Source§fn clone(&self) -> FramedData
fn clone(&self) -> FramedData
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FramedData
impl Debug for FramedData
Source§impl Default for FramedData
impl Default for FramedData
Source§fn default() -> FramedData
fn default() -> FramedData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FramedData
impl RefUnwindSafe for FramedData
impl Send for FramedData
impl Sync for FramedData
impl Unpin for FramedData
impl UnwindSafe for FramedData
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