Struct bonsaidb::core::transmog_pot::pot::de::SymbolList
pub struct SymbolList<'de> { /* private fields */ }
Expand description
A collection of symbols accumulated during deserialization.
Implementations§
§impl<'de> SymbolList<'de>
impl<'de> SymbolList<'de>
pub const fn new() -> SymbolList<'de>
pub const fn new() -> SymbolList<'de>
Returns a new, empty symbol list.
pub 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.
pub fn push(&mut self, ephemeral: &str)
pub fn push(&mut self, ephemeral: &str)
Push a symbol that cannot be borrowed from the deserialization source.
§impl SymbolList<'static>
impl SymbolList<'static>
pub fn deserializer_for_slice<'a, 'de>(
&'a mut self,
slice: &'de [u8]
) -> Result<Deserializer<'a, 'de, SliceReader<'de>>, Error>
pub fn deserializer_for_slice<'a, 'de>( &'a mut self, slice: &'de [u8] ) -> Result<Deserializer<'a, 'de, SliceReader<'de>>, Error>
Returns a deserializer for slice
that reuses symbol ids.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
pub fn deserializer_for<'de, R>(
&mut self,
reader: R
) -> Result<Deserializer<'_, 'de, IoReader<R>>, Error>where
R: Read,
pub fn deserializer_for<'de, R>( &mut self, reader: R ) -> Result<Deserializer<'_, 'de, IoReader<R>>, Error>where R: Read,
Returns a deserializer for reader
.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
pub fn deserialize_slice<'de, T>(
&mut self,
slice: &'de [u8]
) -> Result<T, Error>where
T: Deserialize<'de>,
pub fn deserialize_slice<'de, T>( &mut self, slice: &'de [u8] ) -> Result<T, Error>where T: Deserialize<'de>,
Deserializes T
from slice
.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
pub fn deserialize_from<'de, T>(
&mut self,
reader: impl Read
) -> Result<T, Error>where
T: Deserialize<'de>,
pub fn deserialize_from<'de, T>( &mut self, reader: impl Read ) -> Result<T, Error>where T: Deserialize<'de>,
Deserializes T
from reader
.
This should only be used with data generated by using a persistent
ser::SymbolMap
.
Trait Implementations§
§impl<'de> Debug for SymbolList<'de>
impl<'de> Debug for SymbolList<'de>
§impl Default for SymbolList<'_>
impl Default for SymbolList<'_>
§fn default() -> SymbolList<'_>
fn default() -> SymbolList<'_>
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for SymbolList<'static>
impl<'de> Deserialize<'de> for SymbolList<'static>
§fn deserialize<D>(
deserializer: D
) -> Result<SymbolList<'static>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<SymbolList<'static>, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for SymbolList<'static>
impl Serialize for SymbolList<'static>
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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