pub enum PhoneStatusDocument {
Bitmap(CiscoIpPhoneStatus),
File(CiscoIpPhoneStatusFile),
}Expand description
Either accepted status-service document family.
Variants§
Bitmap(CiscoIpPhoneStatus)
File(CiscoIpPhoneStatusFile)
Implementations§
Source§impl PhoneStatusDocument
impl PhoneStatusDocument
Sourcepub fn validate(&self) -> Result<(), PhoneXmlError>
pub fn validate(&self) -> Result<(), PhoneXmlError>
Applies the invariants for the selected status family.
Sourcepub fn from_xml(document: &[u8]) -> Result<Self, PhoneXmlError>
pub fn from_xml(document: &[u8]) -> Result<Self, PhoneXmlError>
Detects the root and parses either supported status family.
Sourcepub fn to_xml(&self) -> Result<String, PhoneXmlError>
pub fn to_xml(&self) -> Result<String, PhoneXmlError>
Validates and serializes the selected family 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 selected family within a caller-selected limit.
Trait Implementations§
Source§impl Clone for PhoneStatusDocument
impl Clone for PhoneStatusDocument
Source§fn clone(&self) -> PhoneStatusDocument
fn clone(&self) -> PhoneStatusDocument
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 PhoneStatusDocument
impl Debug for PhoneStatusDocument
impl Eq for PhoneStatusDocument
Source§impl PartialEq for PhoneStatusDocument
impl PartialEq for PhoneStatusDocument
impl StructuralPartialEq for PhoneStatusDocument
Auto Trait Implementations§
impl Freeze for PhoneStatusDocument
impl RefUnwindSafe for PhoneStatusDocument
impl Send for PhoneStatusDocument
impl Sync for PhoneStatusDocument
impl Unpin for PhoneStatusDocument
impl UnsafeUnpin for PhoneStatusDocument
impl UnwindSafe for PhoneStatusDocument
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