Skip to main content

ScanFromBinary

Trait ScanFromBinary 

Source
pub trait ScanFromBinary<'a>: Sized {
    // Required method
    fn scan_from_binary<I: ScanInput<'a>>(
        s: I,
    ) -> Result<(Self, usize), ScanError>;
}
Expand description

This trait defines scanning a type from a binary representation.

This should be implemented to match implementations of std::fmt::Binary.

Required Methods§

Source

fn scan_from_binary<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".

Implementations on Foreign Types§

Source§

impl<'a> ScanFromBinary<'a> for i8

Source§

impl<'a> ScanFromBinary<'a> for i16

Source§

impl<'a> ScanFromBinary<'a> for i32

Source§

impl<'a> ScanFromBinary<'a> for i64

Source§

impl<'a> ScanFromBinary<'a> for isize

Source§

impl<'a> ScanFromBinary<'a> for u8

Source§

impl<'a> ScanFromBinary<'a> for u16

Source§

impl<'a> ScanFromBinary<'a> for u32

Source§

impl<'a> ScanFromBinary<'a> for u64

Source§

impl<'a> ScanFromBinary<'a> for usize

Implementors§