pub enum EncodedItem {
Size(u64),
Parent(Parent),
Leaf(Leaf),
Error(EncodeError),
Done,
}
Expand description
A content item for the bao streaming protocol.
Variants§
Size(u64)
total data size, will be the first item
Parent(Parent)
a parent node
Leaf(Leaf)
a leaf node
Error(EncodeError)
an error, will be the last item
Done
done, will be the last item
Trait Implementations§
Source§impl Debug for EncodedItem
impl Debug for EncodedItem
Source§impl<'de> Deserialize<'de> for EncodedItem
impl<'de> Deserialize<'de> for EncodedItem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EncodedItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EncodedItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<EncodeError> for EncodedItem
impl From<EncodeError> for EncodedItem
Source§fn from(e: EncodeError) -> EncodedItem
fn from(e: EncodeError) -> EncodedItem
Converts to this type from the input type.
Source§impl From<Leaf> for EncodedItem
impl From<Leaf> for EncodedItem
Source§fn from(l: Leaf) -> EncodedItem
fn from(l: Leaf) -> EncodedItem
Converts to this type from the input type.
Source§impl From<Parent> for EncodedItem
impl From<Parent> for EncodedItem
Source§fn from(p: Parent) -> EncodedItem
fn from(p: Parent) -> EncodedItem
Converts to this type from the input type.
Source§impl Serialize for EncodedItem
impl Serialize for EncodedItem
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl !Freeze for EncodedItem
impl !RefUnwindSafe for EncodedItem
impl Send for EncodedItem
impl Sync for EncodedItem
impl Unpin for EncodedItem
impl !UnwindSafe for EncodedItem
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