pub type SymbolMap = SymbolList<'static>;
Expand description
An alias to a SymbolList
with a static lifetime. This type persists
symbols referenced across multiple deserialization sessions.
Aliased Type§
struct SymbolMap { /* private fields */ }
Implementations§
source§impl SymbolMap
impl SymbolMap
sourcepub fn deserializer_for_slice<'a, 'de>(
&'a mut self,
slice: &'de [u8],
) -> Result<Deserializer<'a, 'de, SliceReader<'de>>>
pub fn deserializer_for_slice<'a, 'de>( &'a mut self, slice: &'de [u8], ) -> Result<Deserializer<'a, 'de, SliceReader<'de>>>
Returns a deserializer for slice
that reuses symbol ids.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
sourcepub fn deserializer_for<'de, R>(
&mut self,
reader: R,
) -> Result<Deserializer<'_, 'de, IoReader<R>>>where
R: Read,
pub fn deserializer_for<'de, R>(
&mut self,
reader: R,
) -> Result<Deserializer<'_, 'de, IoReader<R>>>where
R: Read,
Returns a deserializer for reader
.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
sourcepub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>where
T: Deserialize<'de>,
pub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>where
T: Deserialize<'de>,
Deserializes T
from slice
.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
sourcepub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>where
T: Deserialize<'de>,
pub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>where
T: Deserialize<'de>,
Deserializes T
from reader
.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for SymbolMap
impl<'de> Deserialize<'de> for SymbolMap
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