time::parsing::shim

Trait Integer

Source
pub(crate) trait Integer: Sized {
    // Required method
    fn parse_bytes(src: &[u8]) -> Option<Self>;
}
Available on crate feature parsing only.
Expand description

Marker trait for all integer types, including NonZero*

Required Methods§

Source

fn parse_bytes(src: &[u8]) -> Option<Self>

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 Integer for u8

Source§

fn parse_bytes(src: &[u8]) -> Option<Self>

Source§

impl Integer for u16

Source§

fn parse_bytes(src: &[u8]) -> Option<Self>

Source§

impl Integer for u32

Source§

fn parse_bytes(src: &[u8]) -> Option<Self>

Source§

impl Integer for u128

Source§

fn parse_bytes(src: &[u8]) -> Option<Self>

Source§

impl Integer for NonZeroU8

Source§

fn parse_bytes(src: &[u8]) -> Option<Self>

Source§

impl Integer for NonZeroU16

Source§

fn parse_bytes(src: &[u8]) -> Option<Self>

Implementors§