[][src]Enum ipp_proto::value::IppValue

pub enum IppValue {
    Integer(i32),
    Enum(i32),
    OctetString(String),
    TextWithoutLanguage(String),
    NameWithoutLanguage(String),
    Charset(String),
    NaturalLanguage(String),
    Uri(String),
    RangeOfInteger {
        min: i32,
        max: i32,
    },
    Boolean(bool),
    Keyword(String),
    ListOf(Vec<IppValue>),
    Collection(Vec<IppValue>),
    MimeMediaType(String),
    DateTime {
        year: u16,
        month: u8,
        day: u8,
        hour: u8,
        minutes: u8,
        seconds: u8,
        deciseconds: u8,
        utcdir: char,
        utchours: u8,
        utcmins: u8,
    },
    MemberAttrName(String),
    Resolution {
        crossfeed: i32,
        feed: i32,
        units: i8,
    },
    Other {
        tag: u8,
        data: Bytes,
    },
}

IPP value enumeration

Variants

Integer(i32)Enum(i32)OctetString(String)TextWithoutLanguage(String)NameWithoutLanguage(String)Charset(String)NaturalLanguage(String)Uri(String)RangeOfInteger

Fields of RangeOfInteger

min: i32max: i32
Boolean(bool)Keyword(String)ListOf(Vec<IppValue>)Collection(Vec<IppValue>)MimeMediaType(String)DateTime

Fields of DateTime

year: u16month: u8day: u8hour: u8minutes: u8seconds: u8deciseconds: u8utcdir: charutchours: u8utcmins: u8
MemberAttrName(String)Resolution

Fields of Resolution

crossfeed: i32feed: i32units: i8
Other

Fields of Other

tag: u8data: Bytes

Methods

impl IppValue[src]

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

Optionally returns references to the inner fields if this is a IppValue::Integer, otherwise None

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

Optionally returns references to the inner fields if this is a IppValue::Enum, otherwise None

pub fn as_octetstring(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::OctetString, otherwise None

pub fn as_textwithoutlanguage(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::TextWithoutLanguage, otherwise None

pub fn as_namewithoutlanguage(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::NameWithoutLanguage, otherwise None

pub fn as_charset(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::Charset, otherwise None

pub fn as_naturallanguage(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::NaturalLanguage, otherwise None

pub fn as_uri(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::Uri, otherwise None

pub fn as_rangeofinteger(&self) -> Option<(&i32, &i32)>[src]

Optionally returns references to the inner fields if this is a IppValue::RangeOfInteger, otherwise None

pub fn as_boolean(&self) -> Option<&bool>[src]

Optionally returns references to the inner fields if this is a IppValue::Boolean, otherwise None

pub fn as_keyword(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::Keyword, otherwise None

pub fn as_listof(&self) -> Option<&Vec<IppValue>>[src]

Optionally returns references to the inner fields if this is a IppValue::ListOf, otherwise None

pub fn as_collection(&self) -> Option<&Vec<IppValue>>[src]

Optionally returns references to the inner fields if this is a IppValue::Collection, otherwise None

pub fn as_mimemediatype(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::MimeMediaType, otherwise None

pub fn as_datetime(
    &self
) -> Option<(&u16, &u8, &u8, &u8, &u8, &u8, &u8, &char, &u8, &u8)>
[src]

Optionally returns references to the inner fields if this is a IppValue::DateTime, otherwise None

pub fn as_memberattrname(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a IppValue::MemberAttrName, otherwise None

pub fn as_resolution(&self) -> Option<(&i32, &i32, &i8)>[src]

Optionally returns references to the inner fields if this is a IppValue::Resolution, otherwise None

pub fn as_other(&self) -> Option<(&u8, &Bytes)>[src]

Optionally returns references to the inner fields if this is a IppValue::Other, otherwise None

impl IppValue[src]

pub fn to_tag(&self) -> ValueTag[src]

Convert to binary tag

pub fn read(vtag: u8, reader: &mut dyn Read) -> Result<IppValue>[src]

Read value from binary stream

Trait Implementations

impl PartialEq<IppValue> for IppValue[src]

impl Clone for IppValue[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> IntoIterator for &'a IppValue[src]

type Item = &'a IppValue

The type of the elements being iterated over.

type IntoIter = IppValueIterator<'a>

Which kind of iterator are we turning this into?

impl Display for IppValue[src]

Implement Display trait to print the value

impl Debug for IppValue[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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

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

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

impl<T> Erased for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,