pub struct ElementDecoder<'a, D: Decoder> { /* private fields */ }Expand description
This struct is created by Element::decoder.
See its documentation for more.
Trait Implementations§
impl<'a, D: Copy + Decoder> Copy for ElementDecoder<'a, D>
Source§impl<D: Decoder> Decoder for ElementDecoder<'_, D>
impl<D: Decoder> Decoder for ElementDecoder<'_, D>
Source§fn get_entity(&self, name: &str) -> Option<&str>
fn get_entity(&self, name: &str) -> Option<&str>
Retrieves the definition for an entity by name.
Source§fn decode_entity(&self, name: &str) -> Result<DecodedEntity<'_>>
fn decode_entity(&self, name: &str) -> Result<DecodedEntity<'_>>
Decodes an entity by either parsing a numeric entity (e.g.
" ") or calling
get_entity.Source§fn decode_string<'a>(&self, s: &'a str) -> Result<Cow<'a, str>>
fn decode_string<'a>(&self, s: &'a str) -> Result<Cow<'a, str>>
Decodes an entire string, replacing all entities inside it with their values resolved by
decode_entity. If the string does not contain any entities, it is
returned unchanged as a borrowed string slice. Otherwise, an owned string containing the
replacements is returned.Auto Trait Implementations§
impl<'a, D> Freeze for ElementDecoder<'a, D>where
D: Freeze,
impl<'a, D> RefUnwindSafe for ElementDecoder<'a, D>where
D: RefUnwindSafe,
impl<'a, D> Send for ElementDecoder<'a, D>where
D: Send,
impl<'a, D> Sync for ElementDecoder<'a, D>where
D: Sync,
impl<'a, D> Unpin for ElementDecoder<'a, D>where
D: Unpin,
impl<'a, D> UnsafeUnpin for ElementDecoder<'a, D>where
D: UnsafeUnpin,
impl<'a, D> UnwindSafe for ElementDecoder<'a, D>where
D: UnwindSafe,
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