Struct syslog_rfc5424::message::StructuredData [] [src]

pub struct StructuredData {
    // some fields omitted
}

Container for the StructuredData component of a syslog message.

This is a map from SD_ID to pairs of SD_ParamID, SD_ParamValue

The spec does not forbid repeated keys. However, for convenience, we do forbid repeated keys. That is to say, if you have a message like

[foo bar="baz" bar="bing"]

There's no way to retrieve the original "baz" mapping.

Methods

impl StructuredData
[src]

fn new_empty() -> StructuredData

fn insert_tuple<SI, SPI, SPV>(&mut self, sd_id: SI, sd_param_id: SPI, sd_param_value: SPV) where SI: Into<SDIDType>, SPI: Into<SDParamIDType>, SPV: Into<SDParamValueType>

Insert a new (sd_id, sd_param_id) -> sd_value mapping into the StructuredData

fn find_tuple<'b>(&'b self, sd_id: &str, sd_param_id: &str) -> Option<&'b SDParamValueType>

Lookup by SDID, SDParamID pair

fn find_sdid<'b>(&'b self, sd_id: &str) -> Option<&'b BTreeMap<SDParamIDTypeSDParamValueType>>

Find all param/value mappings for a given SDID

fn len(&self) -> usize

The number of distinct SD_IDs

Trait Implementations

impl Eq for StructuredData
[src]

impl PartialEq for StructuredData
[src]

fn eq(&self, __arg_0: &StructuredData) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &StructuredData) -> bool

This method tests for !=.

impl Debug for StructuredData
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for StructuredData
[src]

fn clone(&self) -> StructuredData

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Encodable for StructuredData
[src]

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>