Trait ScanSelfFromStr

Source
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§

Source

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.

Implementors§

Source§

impl<'a, T> ScanSelfFromStr<'a> for T
where T: ScanFromStr<'a, Output = T>,