pub enum IppValue {
Show 18 variants
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,
},
}
Expand description
IPP value enumeration
Variants§
Integer(i32)
Enum(i32)
OctetString(String)
TextWithoutLanguage(String)
NameWithoutLanguage(String)
Charset(String)
NaturalLanguage(String)
Uri(String)
RangeOfInteger
Boolean(bool)
Keyword(String)
ListOf(Vec<IppValue>)
Collection(Vec<IppValue>)
MimeMediaType(String)
DateTime
Fields
MemberAttrName(String)
Resolution
Other
Implementations§
Source§impl IppValue
impl IppValue
Sourcepub fn as_integer(&self) -> Option<&i32>
pub fn as_integer(&self) -> Option<&i32>
Optionally returns references to the inner fields if this is a IppValue::Integer
, otherwise None
Sourcepub fn as_enum(&self) -> Option<&i32>
pub fn as_enum(&self) -> Option<&i32>
Optionally returns references to the inner fields if this is a IppValue::Enum
, otherwise None
Sourcepub fn as_octetstring(&self) -> Option<&String>
pub fn as_octetstring(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::OctetString
, otherwise None
Sourcepub fn as_textwithoutlanguage(&self) -> Option<&String>
pub fn as_textwithoutlanguage(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::TextWithoutLanguage
, otherwise None
Sourcepub fn as_namewithoutlanguage(&self) -> Option<&String>
pub fn as_namewithoutlanguage(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::NameWithoutLanguage
, otherwise None
Sourcepub fn as_charset(&self) -> Option<&String>
pub fn as_charset(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::Charset
, otherwise None
Sourcepub fn as_naturallanguage(&self) -> Option<&String>
pub fn as_naturallanguage(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::NaturalLanguage
, otherwise None
Sourcepub fn as_uri(&self) -> Option<&String>
pub fn as_uri(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::Uri
, otherwise None
Sourcepub fn as_rangeofinteger(&self) -> Option<(&i32, &i32)>
pub fn as_rangeofinteger(&self) -> Option<(&i32, &i32)>
Optionally returns references to the inner fields if this is a IppValue::RangeOfInteger
, otherwise None
Sourcepub fn as_boolean(&self) -> Option<&bool>
pub fn as_boolean(&self) -> Option<&bool>
Optionally returns references to the inner fields if this is a IppValue::Boolean
, otherwise None
Sourcepub fn as_keyword(&self) -> Option<&String>
pub fn as_keyword(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::Keyword
, otherwise None
Sourcepub fn as_listof(&self) -> Option<&Vec<IppValue>>
pub fn as_listof(&self) -> Option<&Vec<IppValue>>
Optionally returns references to the inner fields if this is a IppValue::ListOf
, otherwise None
Sourcepub fn as_collection(&self) -> Option<&Vec<IppValue>>
pub fn as_collection(&self) -> Option<&Vec<IppValue>>
Optionally returns references to the inner fields if this is a IppValue::Collection
, otherwise None
Sourcepub fn as_mimemediatype(&self) -> Option<&String>
pub fn as_mimemediatype(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::MimeMediaType
, otherwise None
Sourcepub fn as_datetime(
&self,
) -> Option<(&u16, &u8, &u8, &u8, &u8, &u8, &u8, &char, &u8, &u8)>
pub fn as_datetime( &self, ) -> Option<(&u16, &u8, &u8, &u8, &u8, &u8, &u8, &char, &u8, &u8)>
Optionally returns references to the inner fields if this is a IppValue::DateTime
, otherwise None
Sourcepub fn as_memberattrname(&self) -> Option<&String>
pub fn as_memberattrname(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IppValue::MemberAttrName
, otherwise None