Struct pot::de::SymbolList
source · pub struct SymbolList<'de> { /* private fields */ }
Expand description
A collection of symbols accumulated during deserialization.
Implementations§
source§impl<'de> SymbolList<'de>
impl<'de> SymbolList<'de>
sourcepub fn push_borrowed(&mut self, borrowed: &'de str)
pub fn push_borrowed(&mut self, borrowed: &'de str)
Push a symbol that has been borrowed from the deserialization source.
sourcepub fn push(&mut self, ephemeral: &str)
pub fn push(&mut self, ephemeral: &str)
Push a symbol that cannot be borrowed from the deserialization source.
source§impl SymbolList<'static>
impl SymbolList<'static>
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> Debug for SymbolList<'de>
impl<'de> Debug for SymbolList<'de>
Auto Trait Implementations§
impl<'de> Freeze for SymbolList<'de>
impl<'de> RefUnwindSafe for SymbolList<'de>
impl<'de> Send for SymbolList<'de>
impl<'de> Sync for SymbolList<'de>
impl<'de> Unpin for SymbolList<'de>
impl<'de> UnwindSafe for SymbolList<'de>
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