pub trait PointInput: ParseInput {
type Extra: 'static + Clone;
type WithExtra<E: 'static + Clone>: PointInput<Extra = E, WithExtra<Self::Extra> = Self>;
// Required methods
fn next_index(&mut self) -> usize;
fn resolve_arc_ref(&self) -> &Arc<dyn Resolve>;
fn extra(&self) -> &Self::Extra;
fn map_extra<E: 'static + Clone>(
self,
f: impl FnOnce(&Self::Extra) -> &E,
) -> Self::WithExtra<E>;
fn replace_extra<E: 'static + Clone>(
self,
extra: E,
) -> (Self::Extra, Self::WithExtra<E>);
fn parse_inline_extra<E: 'static + Clone, T: ParseInline<Self::WithExtra<E>>>(
&mut self,
extra: E,
) -> Result<T>;
// Provided methods
fn resolve(&self) -> Arc<dyn Resolve> { ... }
fn resolve_ref(&self) -> &dyn Resolve { ... }
fn with_extra<E: 'static + Clone>(self, extra: E) -> Self::WithExtra<E> { ... }
fn parse_extra<E: 'static + Clone, T: Parse<Self::WithExtra<E>>>(
self,
extra: E,
) -> Result<T> { ... }
}Required Associated Types§
type Extra: 'static + Clone
type WithExtra<E: 'static + Clone>: PointInput<Extra = E, WithExtra<Self::Extra> = Self>
Required Methods§
fn next_index(&mut self) -> usize
fn resolve_arc_ref(&self) -> &Arc<dyn Resolve>
Sourcefn extra(&self) -> &Self::Extra
fn extra(&self) -> &Self::Extra
Get Self::Extra.
Sourcefn map_extra<E: 'static + Clone>(
self,
f: impl FnOnce(&Self::Extra) -> &E,
) -> Self::WithExtra<E>
fn map_extra<E: 'static + Clone>( self, f: impl FnOnce(&Self::Extra) -> &E, ) -> Self::WithExtra<E>
Project the Extra. Under some circumstances, prevents an extra Clone::clone.
Sourcefn replace_extra<E: 'static + Clone>(
self,
extra: E,
) -> (Self::Extra, Self::WithExtra<E>)
fn replace_extra<E: 'static + Clone>( self, extra: E, ) -> (Self::Extra, Self::WithExtra<E>)
Return the old Self::Extra, give a new PointInput with E as Extra.
Sourcefn parse_inline_extra<E: 'static + Clone, T: ParseInline<Self::WithExtra<E>>>(
&mut self,
extra: E,
) -> Result<T>
fn parse_inline_extra<E: 'static + Clone, T: ParseInline<Self::WithExtra<E>>>( &mut self, extra: E, ) -> Result<T>
ParseInput::parse_inline with a different Extra.
Provided Methods§
fn resolve(&self) -> Arc<dyn Resolve>
fn resolve_ref(&self) -> &dyn Resolve
Sourcefn with_extra<E: 'static + Clone>(self, extra: E) -> Self::WithExtra<E>
fn with_extra<E: 'static + Clone>(self, extra: E) -> Self::WithExtra<E>
Self::replace_extra but discarding Self::Extra.
Sourcefn parse_extra<E: 'static + Clone, T: Parse<Self::WithExtra<E>>>(
self,
extra: E,
) -> Result<T>
fn parse_extra<E: 'static + Clone, T: Parse<Self::WithExtra<E>>>( self, extra: E, ) -> Result<T>
ParseInput::parse with a different Extra.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.