pub trait ScanSelfFromStr<'a>: ScanFromStr<'a, Output = Self> {
// Provided method
fn scan_self_from<I: ScanInput<'a>>(
s: I,
) -> Result<(Self, usize), ScanError> { ... }
}
Expand description
This is a convenience trait automatically implemented for all scanners which result in themselves (i.e. ScanFromStr::Output = Self
).
This exists to aid type inference.
See: ScanFromStr
.
Provided Methods§
Sourcefn scan_self_from<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>
fn scan_self_from<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>
Perform a scan on the given input.
See: ScanFromStr::scan_from
.
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.