Trait x11rb_protocol::x11_utils::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

Object Safety§

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§