pub enum StatementKindWire {
Fact,
Preference,
Event,
Attribute,
Relation,
Directive,
Custom(u8),
}Expand description
Statement kind. The fieldless variants encode as a CBOR string unit
variant (plain serde, not an integer discriminant); Custom(u8) encodes
as a single-entry CBOR map {"Custom": <byte>} — the server does the
same. The storage-byte mapping is 0 = Fact, 1 = Preference,
2 = Event, 3 = Attribute, 4 = Relation, 5 = Directive, and any
byte >= 6 is a Custom(byte).
Variants§
Implementations§
Source§impl StatementKindWire
impl StatementKindWire
Sourcepub fn to_storage_byte(self) -> u8
pub fn to_storage_byte(self) -> u8
The storage discriminant byte for this kind.
Sourcepub fn from_storage_byte(byte: u8) -> Self
pub fn from_storage_byte(byte: u8) -> Self
The kind for a storage discriminant byte. Bytes >= 6 map to
Custom(byte).
Trait Implementations§
Source§impl Clone for StatementKindWire
impl Clone for StatementKindWire
impl Copy for StatementKindWire
Source§impl Debug for StatementKindWire
impl Debug for StatementKindWire
Source§impl<'de> Deserialize<'de> for StatementKindWire
impl<'de> Deserialize<'de> for StatementKindWire
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StatementKindWire
Source§impl PartialEq for StatementKindWire
impl PartialEq for StatementKindWire
Source§impl Serialize for StatementKindWire
impl Serialize for StatementKindWire
impl StructuralPartialEq for StatementKindWire
Auto Trait Implementations§
impl Freeze for StatementKindWire
impl RefUnwindSafe for StatementKindWire
impl Send for StatementKindWire
impl Sync for StatementKindWire
impl Unpin for StatementKindWire
impl UnsafeUnpin for StatementKindWire
impl UnwindSafe for StatementKindWire
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