pub struct RawAmiMessage {
pub headers: Vec<(String, String)>,
pub output: Vec<String>,
pub channel_variables: HashMap<String, String>,
}Expand description
raw AMI message as parsed from the wire
Fields§
§headers: Vec<(String, String)>ordered key-value headers
output: Vec<String>command output lines (for Response: Follows)
channel_variables: HashMap<String, String>channel variables extracted from ChanVariable(name) headers
Implementations§
Source§impl RawAmiMessage
impl RawAmiMessage
Sourcepub fn get(&self, key: &str) -> Option<&str>
pub fn get(&self, key: &str) -> Option<&str>
get the first value for a given key (case-insensitive)
Sourcepub fn get_all(&self, key: &str) -> Vec<&str>
pub fn get_all(&self, key: &str) -> Vec<&str>
get all values for a given key (case-insensitive)
Sourcepub fn is_response(&self) -> bool
pub fn is_response(&self) -> bool
check if this is a response message
Sourcepub fn get_variable(&self, name: &str) -> Option<&str>
pub fn get_variable(&self, name: &str) -> Option<&str>
get a channel variable by name
Trait Implementations§
Source§impl Clone for RawAmiMessage
impl Clone for RawAmiMessage
Source§fn clone(&self) -> RawAmiMessage
fn clone(&self) -> RawAmiMessage
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 RawAmiMessage
impl Debug for RawAmiMessage
Source§impl Encoder<RawAmiMessage> for AmiCodec
impl Encoder<RawAmiMessage> for AmiCodec
Source§impl PartialEq for RawAmiMessage
impl PartialEq for RawAmiMessage
impl StructuralPartialEq for RawAmiMessage
Auto Trait Implementations§
impl Freeze for RawAmiMessage
impl RefUnwindSafe for RawAmiMessage
impl Send for RawAmiMessage
impl Sync for RawAmiMessage
impl Unpin for RawAmiMessage
impl UnsafeUnpin for RawAmiMessage
impl UnwindSafe for RawAmiMessage
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