pub struct MessageOptionsList(/* private fields */);Expand description
A collection of MessageOptions.
Implementations§
Source§impl MessageOptionsList
impl MessageOptionsList
Sourcepub fn find_option(&self, tag: u8) -> Option<&MessageOptions>
pub fn find_option(&self, tag: u8) -> Option<&MessageOptions>
Returns the MessageOptions that has the passed tag within the MessageOptionsList if it exists.
Sourcepub fn add_option(&mut self, option: MessageOptions)
pub fn add_option(&mut self, option: MessageOptions)
Appends a MessageOptions onto the MessageOptionsList.
Sourcepub fn get(&self, index: usize) -> Option<&MessageOptions>
👎Deprecated
pub fn get(&self, index: usize) -> Option<&MessageOptions>
Returns the MessageOptions with the passed index in the list.
WARNING: be careful using this as it might not always be available
Sourcepub fn set(&mut self, index: usize, option: MessageOptions)
👎Deprecated
pub fn set(&mut self, index: usize, option: MessageOptions)
Changes the MessageOptions at the passed index in the list.
WARNING: be careful using this as it might not always be available
Sourcepub fn from_bytes(bytes: &[u8]) -> Self
pub fn from_bytes(bytes: &[u8]) -> Self
Takes an array slice and parses the TLV sub-format
Trait Implementations§
Source§impl Debug for MessageOptionsList
impl Debug for MessageOptionsList
Source§impl From<&MessageOptionsList> for Vec<u8>
impl From<&MessageOptionsList> for Vec<u8>
Source§fn from(list: &MessageOptionsList) -> Self
fn from(list: &MessageOptionsList) -> Self
Converts to this type from the input type.
Source§impl From<Vec<MessageOptions>> for MessageOptionsList
impl From<Vec<MessageOptions>> for MessageOptionsList
Source§fn from(options: Vec<MessageOptions>) -> Self
fn from(options: Vec<MessageOptions>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MessageOptionsList
impl PartialEq for MessageOptionsList
impl StructuralPartialEq for MessageOptionsList
Auto Trait Implementations§
impl Freeze for MessageOptionsList
impl RefUnwindSafe for MessageOptionsList
impl Send for MessageOptionsList
impl Sync for MessageOptionsList
impl Unpin for MessageOptionsList
impl UnsafeUnpin for MessageOptionsList
impl UnwindSafe for MessageOptionsList
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