pub struct DogstatsdCodec { /* private fields */ }
Expand description
A DogStatsD codec.
This codec is used to parse the DogStatsD protocol, which is a superset of the StatsD protocol. DogStatsD adds a number of additional features, such as the ability to specify tags, send histograms directly, send service checks and events (DataDog-specific), and more.
Implementations§
Source§impl DogstatsdCodec
impl DogstatsdCodec
Sourcepub fn from_configuration(config: DogstatsdCodecConfiguration) -> Self
pub fn from_configuration(config: DogstatsdCodecConfiguration) -> Self
Sets the given configuration for the codec.
Different aspects of the codec’s behavior (such as tag length, tag count, and timestamp parsing) can be
controlled through its configuration. See DogstatsdCodecConfiguration
for more information.
Sourcepub fn decode_packet<'a>(
&self,
data: &'a [u8],
) -> Result<ParsedPacket<'a>, ParseError>
pub fn decode_packet<'a>( &self, data: &'a [u8], ) -> Result<ParsedPacket<'a>, ParseError>
Decodes a DogStatsD packet from the given raw data.
§Errors
If the raw data is not a valid DogStatsD packet, an error is returned.
Trait Implementations§
Source§impl Clone for DogstatsdCodec
impl Clone for DogstatsdCodec
Source§fn clone(&self) -> DogstatsdCodec
fn clone(&self) -> DogstatsdCodec
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 moreAuto Trait Implementations§
impl Freeze for DogstatsdCodec
impl RefUnwindSafe for DogstatsdCodec
impl Send for DogstatsdCodec
impl Sync for DogstatsdCodec
impl Unpin for DogstatsdCodec
impl UnwindSafe for DogstatsdCodec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read moreSource§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked
wrapper. Read more