Type Alias pot::de::SymbolMap

source ·
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

source

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.

source

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.

source

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.

source

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

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for SymbolMap

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more