pub struct CiscoIpPhoneStatusFile {
pub text: Option<String>,
pub timer_seconds: Option<u16>,
pub location_x: Option<i16>,
pub location_y: Option<i16>,
pub url: PhoneImageUrl,
}Expand description
A URL-backed status item displayed in the phone’s status area.
Fields§
§text: Option<String>§timer_seconds: Option<u16>Duration in seconds; omission leaves display lifetime device-defined.
location_x: Option<i16>Horizontal origin in -1..=261; -1 requests automatic placement.
location_y: Option<i16>Vertical origin in -1..=49; -1 requests automatic placement.
url: PhoneImageUrlImplementations§
Source§impl CiscoIpPhoneStatusFile
impl CiscoIpPhoneStatusFile
Sourcepub fn validate(&self) -> Result<(), PhoneXmlError>
pub fn validate(&self) -> Result<(), PhoneXmlError>
Validates text and the optional referenced-image origin.
Sourcepub fn from_xml(document: &[u8]) -> Result<Self, PhoneXmlError>
pub fn from_xml(document: &[u8]) -> Result<Self, PhoneXmlError>
Parses and validates a referenced status item using its default byte bound.
Sourcepub fn from_xml_with_limit(
document: &[u8],
maximum_bytes: usize,
) -> Result<Self, PhoneXmlError>
pub fn from_xml_with_limit( document: &[u8], maximum_bytes: usize, ) -> Result<Self, PhoneXmlError>
Parses a referenced status item with an additional caller-selected limit.
Sourcepub fn to_xml(&self) -> Result<String, PhoneXmlError>
pub fn to_xml(&self) -> Result<String, PhoneXmlError>
Validates and serializes the status item using PHONE_STATUS_MAX_BYTES.
Sourcepub fn to_xml_with_limit(
&self,
maximum_bytes: usize,
) -> Result<String, PhoneXmlError>
pub fn to_xml_with_limit( &self, maximum_bytes: usize, ) -> Result<String, PhoneXmlError>
Validates and serializes the status item within a caller-selected limit.
Trait Implementations§
Source§impl Clone for CiscoIpPhoneStatusFile
impl Clone for CiscoIpPhoneStatusFile
Source§fn clone(&self) -> CiscoIpPhoneStatusFile
fn clone(&self) -> CiscoIpPhoneStatusFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CiscoIpPhoneStatusFile
impl Debug for CiscoIpPhoneStatusFile
Source§impl<'de> Deserialize<'de> for CiscoIpPhoneStatusFile
impl<'de> Deserialize<'de> for CiscoIpPhoneStatusFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CiscoIpPhoneStatusFile
Source§impl PartialEq for CiscoIpPhoneStatusFile
impl PartialEq for CiscoIpPhoneStatusFile
Source§impl PhoneXmlDocument for CiscoIpPhoneStatusFile
impl PhoneXmlDocument for CiscoIpPhoneStatusFile
Source§const ROOT: &'static [u8] = b"CiscoIPPhoneStatusFile"
const ROOT: &'static [u8] = b"CiscoIPPhoneStatusFile"
Exact root element accepted for this document model.
Source§const MAXIMUM_BYTES: usize = PHONE_STATUS_MAX_BYTES
const MAXIMUM_BYTES: usize = PHONE_STATUS_MAX_BYTES
Default maximum encoded document size, in bytes.
Source§fn validate_document(&self) -> Result<(), PhoneXmlError>
fn validate_document(&self) -> Result<(), PhoneXmlError>
Checks schema invariants that cannot be expressed by Serde types alone.
Source§fn parse_xml(document: &[u8]) -> Result<Self, PhoneXmlError>
fn parse_xml(document: &[u8]) -> Result<Self, PhoneXmlError>
Parses the exact schema root within
Self::MAXIMUM_BYTES.Source§fn parse_xml_with_limit(
document: &[u8],
maximum_bytes: usize,
) -> Result<Self, PhoneXmlError>
fn parse_xml_with_limit( document: &[u8], maximum_bytes: usize, ) -> Result<Self, PhoneXmlError>
Parses the exact schema root within a caller-selected byte limit. Read more
Source§fn serialize_xml(&self) -> Result<String, PhoneXmlError>
fn serialize_xml(&self) -> Result<String, PhoneXmlError>
Validates and serializes the document within
Self::MAXIMUM_BYTES.Source§fn serialize_xml_with_limit(
&self,
maximum_bytes: usize,
) -> Result<String, PhoneXmlError>
fn serialize_xml_with_limit( &self, maximum_bytes: usize, ) -> Result<String, PhoneXmlError>
Validates and serializes the document within a caller-selected byte limit.
Source§impl Serialize for CiscoIpPhoneStatusFile
impl Serialize for CiscoIpPhoneStatusFile
impl StructuralPartialEq for CiscoIpPhoneStatusFile
Auto Trait Implementations§
impl Freeze for CiscoIpPhoneStatusFile
impl RefUnwindSafe for CiscoIpPhoneStatusFile
impl Send for CiscoIpPhoneStatusFile
impl Sync for CiscoIpPhoneStatusFile
impl Unpin for CiscoIpPhoneStatusFile
impl UnsafeUnpin for CiscoIpPhoneStatusFile
impl UnwindSafe for CiscoIpPhoneStatusFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more