pub enum WireValue {
U64(u64),
Bytes(Vec<u8>),
Opaque(String),
}Expand description
Type-discriminated wire-constant value. Integers and ASCII bytestrings
are typed; anything else is preserved verbatim as Opaque.
Variants§
U64(u64)
Unsigned integer literal (-define(VERSION, 2)).
Bytes(Vec<u8>)
Bytestring literal (-define(MAGIC, <<"RASG">>)). Stored as
the inner bytes without the <<"...">> wrapper. The text-format
round-trip assumes ASCII-printable bytes: non-printable byte
content should land in Opaque instead.
Opaque(String)
Anything else, preserved as the raw token text.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WireValue
impl<'de> Deserialize<'de> for WireValue
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 WireValue
impl StructuralPartialEq for WireValue
Auto Trait Implementations§
impl Forget for WireValue
impl Freeze for WireValue
impl Move for WireValue
impl RefUnwindSafe for WireValue
impl Send for WireValue
impl Sync for WireValue
impl Unpin for WireValue
impl UnsafeUnpin for WireValue
impl UnwindSafe for WireValue
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