pub trait ExactSizeInput<'src>: Input<'src> {
// Required method
unsafe fn span_from(
cache: &mut Self::Cache,
range: RangeFrom<&Self::Cursor>,
) -> Self::Span;
}Expand description
Implemented by inputs that have a known size.
In this case, ‘size’ means ‘number of generated tokens/spans’. You can think of this trait as filling the same
niche as ExactSizeIterator.
Required Methods§
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.
Implementations on Foreign Types§
Source§impl<'src> ExactSizeInput<'src> for &'src str
impl<'src> ExactSizeInput<'src> for &'src str
Source§impl<'src> ExactSizeInput<'src> for Bytes
Available on crate feature bytes only.
impl<'src> ExactSizeInput<'src> for Bytes
Available on crate feature
bytes only.