[−][src]Struct statsdproto::statsd::StatsdPDU
A StatsdPDU is an incoming protocol unit for statsd messages, commonly a single datagram or a line-delimitated message. This PDU type owns an incoming message and can offer references to protocol fields. It only performs limited parsing of the protocol unit.
Implementations
impl StatsdPDU
[src]
pub fn name(&self) -> &[u8]
[src]
pub fn value(&self) -> &[u8]
[src]
pub fn pdu_type(&self) -> &[u8]
[src]
pub fn tags(&self) -> Option<&[u8]>
[src]
pub fn sample_rate(&self) -> Option<&[u8]>
[src]
pub fn len(&self) -> usize
[src]
pub fn as_ref(&self) -> &[u8]
[src]
pub fn with_prefix_suffix(&self, prefix: &[u8], suffix: &[u8]) -> Self
[src]
Return a clone of the PDU with a prefix and suffix attached to the statsd name
pub fn new(line: Bytes) -> Option<Self>
[src]
Parse an incoming single protocol unit and capture internal field offsets for the positions and lengths of various protocol fields for later access. No parsing or validation of values is done, so at a low level this can be used to pass through unknown types and protocols.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StatsdPDU
[src]
impl Send for StatsdPDU
[src]
impl Sync for StatsdPDU
[src]
impl Unpin for StatsdPDU
[src]
impl UnwindSafe for StatsdPDU
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,