pub enum Frame {
Control(Message),
BlobStart {
hash: ContentHash,
len: u64,
},
BlobChunk(Vec<u8>),
BlobEnd,
}Expand description
One frame off the wire.
Content travels as one BlobStart, its chunks in order, then BlobEnd — or a
Message::Aborted in place of the end. Control frames may come between the chunks.
Variants§
Control(Message)
A control message.
BlobStart
The start of a piece of content.
Fields
§
hash: ContentHashThe content’s hash, which the receiver must verify once it is all in.
BlobChunk(Vec<u8>)
The next piece of the content started last, at most CHUNK bytes.
BlobEnd
The content started last is complete.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Frame
impl Freeze for Frame
impl Move for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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