pub enum DataFormat {
Json,
Yaml,
Toml,
Csv,
}Expand description
Data format for STRUCTURED_DATA blocks.
Identifies the serialization format of the block’s content field, so the renderer can syntax-highlight or parse it appropriately.
┌──────┬──────┐
│ Wire │ Fmt │
├──────┼──────┤
│ 0x01 │ Json │
│ 0x02 │ Yaml │
│ 0x03 │ Toml │
│ 0x04 │ Csv │
└──────┴──────┘Variants§
Implementations§
Source§impl DataFormat
impl DataFormat
Sourcepub fn to_wire_byte(self) -> u8
pub fn to_wire_byte(self) -> u8
Encode this variant as a single wire byte.
Sourcepub fn from_wire_byte(value: u8) -> Result<Self, TypeError>
pub fn from_wire_byte(value: u8) -> Result<Self, TypeError>
Decode a wire byte into this enum.
Returns Err(TypeError::InvalidEnumValue) if the byte
doesn’t match any known variant.
Trait Implementations§
Source§impl Clone for DataFormat
impl Clone for DataFormat
Source§fn clone(&self) -> DataFormat
fn clone(&self) -> DataFormat
Returns a duplicate 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 DataFormat
impl Debug for DataFormat
Source§impl PartialEq for DataFormat
impl PartialEq for DataFormat
impl Copy for DataFormat
impl Eq for DataFormat
impl StructuralPartialEq for DataFormat
Auto Trait Implementations§
impl Freeze for DataFormat
impl RefUnwindSafe for DataFormat
impl Send for DataFormat
impl Sync for DataFormat
impl Unpin for DataFormat
impl UnsafeUnpin for DataFormat
impl UnwindSafe for DataFormat
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