[][src]Struct libmtp_rs::values::AllowedValues

pub struct AllowedValues { /* fields omitted */ }

Contains the allowed values of an specific attribute, determines which data type should be used, and if the values are a range or enumeration.

Implementations

impl AllowedValues[src]

pub fn is_range(&self) -> bool[src]

Check whether the allowed values are a range or enumeration.

pub fn datatype(&self) -> DataType[src]

Returns the data type that should be used.

pub fn u8_values(&self) -> Option<&Values<u8>>[src]

Returns the u8 values, if the data type isn't DataType::U8 this will return None.

pub fn i8_values(&self) -> Option<&Values<i8>>[src]

Returns the i8 values, if the data type isn't DataType::I8 this will return None.

pub fn u16_values(&self) -> Option<&Values<u16>>[src]

Returns the u16 values, if the data type isn't DataType::U16 this will return None.

pub fn i16_values(&self) -> Option<&Values<i16>>[src]

Returns the i16 values, if the data type isn't DataType::I16 this will return None.

pub fn u32_values(&self) -> Option<&Values<u32>>[src]

Returns the u32 values, if the data type isn't DataType::U32 this will return None.

pub fn i32_values(&self) -> Option<&Values<i32>>[src]

Returns the i32 values, if the data type isn't DataType::I32 this will return None.

pub fn u64_values(&self) -> Option<&Values<u64>>[src]

Returns the u64 values, if the data type isn't DataType::U64 this will return None.

pub fn i64_values(&self) -> Option<&Values<i64>>[src]

Returns the i64 values, if the data type isn't DataType::I64 this will return None.

Trait Implementations

impl Clone for AllowedValues[src]

impl Debug for AllowedValues[src]

impl Default for AllowedValues[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.