pub enum ValueRef<'lt> {
Nil,
Bool(bool),
Num(Num),
Bin(&'lt [u8]),
Str(Utf8StrRef<'lt>),
Arr(Vec<ValueRef<'lt>>),
Map(Vec<(ValueRef<'lt>, ValueRef<'lt>)>),
Ext(i8, &'lt [u8]),
}Expand description
MessagePack Rust Value Reference type
Variants§
Nil
MessagePack Nil type
Bool(bool)
MessagePack Boolean type
Num(Num)
MessagePack Number type
Bin(&'lt [u8])
MessagePack Bin type
Str(Utf8StrRef<'lt>)
MessagePack Str type
Arr(Vec<ValueRef<'lt>>)
MessagePack Arr type
Map(Vec<(ValueRef<'lt>, ValueRef<'lt>)>)
MessagePack Map type
Ext(i8, &'lt [u8])
MessagePack Ext type
Implementations§
Source§impl<'lt> ValueRef<'lt>
impl<'lt> ValueRef<'lt>
Sourcepub fn to_sync<'con, C>(&self, c: C) -> Result<()>where
C: Into<DynConsumerSync<'con>>,
pub fn to_sync<'con, C>(&self, c: C) -> Result<()>where
C: Into<DynConsumerSync<'con>>,
Encode this value ref as message pack data to the given consumer.
E.g. &mut Vec<u8>
Sourcepub fn to_sync_config<'con, C>(&self, c: C, config: &Config) -> Result<()>where
C: Into<DynConsumerSync<'con>>,
pub fn to_sync_config<'con, C>(&self, c: C, config: &Config) -> Result<()>where
C: Into<DynConsumerSync<'con>>,
Encode this value ref as message pack data to the given consumer.
E.g. &mut Vec<u8>
Sourcepub async fn to_async<'con, C>(&self, c: C) -> Result<()>where
C: Into<DynConsumerAsync<'con>>,
pub async fn to_async<'con, C>(&self, c: C) -> Result<()>where
C: Into<DynConsumerAsync<'con>>,
Encode this value ref as message pack data to the given consumer.
E.g. &mut Vec<u8>
Sourcepub async fn to_async_config<'con, C>(
&self,
c: C,
config: &Config,
) -> Result<()>where
C: Into<DynConsumerAsync<'con>>,
pub async fn to_async_config<'con, C>(
&self,
c: C,
config: &Config,
) -> Result<()>where
C: Into<DynConsumerAsync<'con>>,
Encode this value ref as message pack data to the given consumer.
E.g. &mut Vec<u8>
Sourcepub fn from_ref<P>(p: P) -> Result<Self>where
P: Into<DynProducerComplete<'lt>>,
pub fn from_ref<P>(p: P) -> Result<Self>where
P: Into<DynProducerComplete<'lt>>,
Decode a ValueRef from something that can be converted
into a DynProducerComplete, such as a byte array slice (&[u8])
Sourcepub fn from_ref_config<P>(p: P, config: &Config) -> Result<Self>where
P: Into<DynProducerComplete<'lt>>,
pub fn from_ref_config<P>(p: P, config: &Config) -> Result<Self>where
P: Into<DynProducerComplete<'lt>>,
Decode a ValueRef from something that can be converted
into a DynProducerComplete, such as a byte array slice (&[u8])
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ValueRef<'de>
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ValueRef<'de>
serde only.