pub struct FormatRfc5424Sd { /* private fields */ }
Expand description
A RFC5424 SD-ELEMENT of the STRUCTURED-DATA.
i.e [exampleSDID@32473 iut=“3” eventSource=“Application” eventID=“1011”]
RFC:
SD-IDs are case-sensitive and uniquely identify the type and purpose of the SD-ELEMENT. The same SD-ID MUST NOT exist more than once in a message.
There are two formats for SD-ID names:
- Names that do not contain an at-sign (“@”, ABNF %d64) are reserved to be assigned by IETF
- Anyone can define additional SD-IDs using names in the format name@
, e.g., “ourSDID@32473”. The format of the part preceding the at-sign is not specified; sd_id
RFC:
Each SD-PARAM consists of a name, referred to as PARAM-NAME, and a value, referred to as PARAM-VALUE. PARAM-NAME is case-sensitive. To support international characters, the PARAM-VALUE field MUST be encoded using UTF-8. vals
Implementations§
Source§impl FormatRfc5424Sd
impl FormatRfc5424Sd
Sourcepub fn new(sd_id: &'static str, vals_cnt: usize) -> SyRes<Self>
pub fn new(sd_id: &'static str, vals_cnt: usize) -> SyRes<Self>
Creates the second type of the SD-ID in format of
name@
RFC5424:
The format of the part preceding the at-sign is not specified;
however, these names MUST be printable US-ASCII strings, and MUST
NOT contain an at-sign ('@', ABNF %d64), an equal-sign ('=', ABNF
%d61), a closing brace (']', ABNF %d93), a quote-character ('"',
ABNF %d34), whitespace, or control characters. The part following
the at-sign MUST be a private enterprise number as specified in
Section 7.2.2. Please note that throughout this document the
value of 32473 is used for all private enterprise numbers. This
value has been reserved by IANA to be used as an example number in
documentation. Implementors will need to use their own private
enterprise number for the enterpriseId parameter, and when
creating locally extensible SD-ID names.
§Arguments
-
sd_id
- a sd_id which is stored with static lifetime. -
vals_cnt
- amount of the values to be added.
§Returns
Trait Implementations§
Source§impl Clone for FormatRfc5424Sd
impl Clone for FormatRfc5424Sd
Source§fn clone(&self) -> FormatRfc5424Sd
fn clone(&self) -> FormatRfc5424Sd
Returns a duplicate of the value. Read more
1.0.0 · 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 FormatRfc5424Sd
impl Debug for FormatRfc5424Sd
Auto Trait Implementations§
impl Freeze for FormatRfc5424Sd
impl RefUnwindSafe for FormatRfc5424Sd
impl Send for FormatRfc5424Sd
impl Sync for FormatRfc5424Sd
impl Unpin for FormatRfc5424Sd
impl UnwindSafe for FormatRfc5424Sd
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