pub enum Event {
Metric(Metric),
EventD(EventD),
ServiceCheck(ServiceCheck),
Log(Log),
}
Expand description
A telemetry event.
Variants§
Metric(Metric)
A metric.
EventD(EventD)
A Datadog Event.
ServiceCheck(ServiceCheck)
A service check.
Log(Log)
A log.
Implementations§
Source§impl Event
impl Event
Sourcepub fn event_type(&self) -> EventType
pub fn event_type(&self) -> EventType
Gets the type of this event.
Sourcepub fn try_into_metric(self) -> Option<Metric>
pub fn try_into_metric(self) -> Option<Metric>
Returns the inner event value, if this event is a Metric
.
Otherwise, None
is returned and the original event is consumed.
Sourcepub fn try_as_metric(&self) -> Option<&Metric>
pub fn try_as_metric(&self) -> Option<&Metric>
Returns a reference inner event value, if this event is a Metric
.
Otherwise, None
is returned.
Sourcepub fn try_as_metric_mut(&mut self) -> Option<&mut Metric>
pub fn try_as_metric_mut(&mut self) -> Option<&mut Metric>
Returns a mutable reference inner event value, if this event is a Metric
.
Otherwise, None
is returned.
Sourcepub fn try_into_eventd(self) -> Option<EventD>
pub fn try_into_eventd(self) -> Option<EventD>
Returns the inner event value, if this event is a EventD
.
Otherwise, None
is returned and the original event is consumed.
Sourcepub fn try_into_service_check(self) -> Option<ServiceCheck>
pub fn try_into_service_check(self) -> Option<ServiceCheck>
Returns the inner event value, if this event is a ServiceCheck
.
Otherwise, None
is returned and the original event is consumed.
Sourcepub fn is_service_check(&self) -> bool
pub fn is_service_check(&self) -> bool
Returns true
if the event is a service check.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
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
§impl<T> Track for T
impl<T> Track for T
§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 more§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