pub struct DatumDecoder(/* private fields */);Expand description
Decoder for the Datum encoding layer.
Trait Implementations§
Source§impl Clone for DatumDecoder
impl Clone for DatumDecoder
Source§fn clone(&self) -> DatumDecoder
fn clone(&self) -> DatumDecoder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DatumPipe for DatumDecoder
impl DatumPipe for DatumDecoder
type Input = char
type Output = DatumChar
Source§fn feed<F: FnMut(DatumOffset, DatumChar) -> DatumResult<()>>(
&mut self,
at: DatumOffset,
char: Option<char>,
f: &mut F,
) -> DatumResult<()>
fn feed<F: FnMut(DatumOffset, DatumChar) -> DatumResult<()>>( &mut self, at: DatumOffset, char: Option<char>, f: &mut F, ) -> DatumResult<()>
Feeds in I, and you may some amount of O.
If None is passed, EOF happened.
Beware that EOF offsets will ‘skip’ the function for future stages, so transforming offsets here is not okay. The primary purpose of the offset output is to ensure offsets reliably point at the start of an output, rather than the end; this can be used for various useful purposes.
Because of that, offsets may “jump backwards” if it’s useful to do so (this happens in the tokenizer).
Source§fn feed_iter_to_vec<S: IntoIterator<Item = Self::Input>, V: Extend<Self::Output>>(
&mut self,
target: &mut V,
source: S,
eof: bool,
) -> DatumResult<()>
fn feed_iter_to_vec<S: IntoIterator<Item = Self::Input>, V: Extend<Self::Output>>( &mut self, target: &mut V, source: S, eof: bool, ) -> DatumResult<()>
Feeds into a vec or similar from a slice.
Offsets are automatically managed, starting from 0 and increasing by 1 for each input element.
Can also automatically trigger EOF. Read more
Source§impl Debug for DatumDecoder
impl Debug for DatumDecoder
Source§impl Default for DatumDecoder
impl Default for DatumDecoder
Source§fn default() -> DatumDecoder
fn default() -> DatumDecoder
Returns the “default value” for a type. Read more
Source§impl PartialEq for DatumDecoder
impl PartialEq for DatumDecoder
impl Copy for DatumDecoder
impl Eq for DatumDecoder
impl StructuralPartialEq for DatumDecoder
Auto Trait Implementations§
impl Freeze for DatumDecoder
impl RefUnwindSafe for DatumDecoder
impl Send for DatumDecoder
impl Sync for DatumDecoder
impl Unpin for DatumDecoder
impl UnwindSafe for DatumDecoder
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