x11rb_protocol::x11_utils

Trait TryIntoUSize

Source
pub(crate) trait TryIntoUSize: TryInto<usize> {
    // Provided method
    fn try_to_usize(self) -> Result<usize, ParseError> { ... }
}
Expand description

Wrapper around TryInto that produces a ParseError.

This trait shortens x.try_into().or(Err(ParseError::ConversionFailed)) to x.try_to_usize().

Provided Methods§

Source

fn try_to_usize(self) -> Result<usize, ParseError>

Attempt the conversion

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 TryIntoUSize for i8

Source§

impl TryIntoUSize for i16

Source§

impl TryIntoUSize for i32

Source§

impl TryIntoUSize for i64

Source§

impl TryIntoUSize for u8

Source§

impl TryIntoUSize for u16

Source§

impl TryIntoUSize for u32

Source§

impl TryIntoUSize for u64

Implementors§