pub struct MtfMap<'data, T> { /* private fields */ }
Expand description
MTF (Move-To-Front) map.
Implementations
sourceimpl<'data, T> MtfMap<'data, T>
impl<'data, T> MtfMap<'data, T>
sourcepub fn remove_last(&mut self) -> Entry<'data, T>
pub fn remove_last(&mut self) -> Entry<'data, T>
Removes the last entry in the MTF map.
sourcepub fn decode<Out, Parser>(
&mut self,
parser: &mut Parser,
idx: Idx,
if_absent: impl FnOnce(&mut Parser, Entry<'data, T>) -> Res<(&'data str, T)>,
binding_do: impl FnOnce(&mut Parser, &'data str, &mut T) -> Res<Out>
) -> Res<Out> where
Parser: CanParse<'data>,
pub fn decode<Out, Parser>(
&mut self,
parser: &mut Parser,
idx: Idx,
if_absent: impl FnOnce(&mut Parser, Entry<'data, T>) -> Res<(&'data str, T)>,
binding_do: impl FnOnce(&mut Parser, &'data str, &mut T) -> Res<Out>
) -> Res<Out> where
Parser: CanParse<'data>,
Decodes a location at the current position in the input parser.
Trait Implementations
Auto Trait Implementations
impl<'data, T> RefUnwindSafe for MtfMap<'data, T> where
T: RefUnwindSafe,
impl<'data, T> Send for MtfMap<'data, T> where
T: Send,
impl<'data, T> Sync for MtfMap<'data, T> where
T: Sync,
impl<'data, T> Unpin for MtfMap<'data, T> where
T: Unpin,
impl<'data, T> UnwindSafe for MtfMap<'data, T> where
T: UnwindSafe,
Blanket Implementations
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ConvUtil for T
impl<T> ConvUtil for T
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.