pub enum EventArray {
Logs(LogArray),
Metrics(MetricArray),
Traces(TraceArray),
}Expand description
An array of one of the Event variants exclusively.
Variants§
Logs(LogArray)
An array of type LogEvent
Metrics(MetricArray)
An array of type Metric
Traces(TraceArray)
An array of type TraceEvent
Implementations§
Source§impl EventArray
impl EventArray
Sourcepub fn iter_events(&self) -> impl Iterator<Item = EventRef<'_>>
pub fn iter_events(&self) -> impl Iterator<Item = EventRef<'_>>
Iterate over references to this array’s events.
Sourcepub fn iter_events_mut(&mut self) -> impl Iterator<Item = EventMutRef<'_>>
pub fn iter_events_mut(&mut self) -> impl Iterator<Item = EventMutRef<'_>>
Iterate over mutable references to this array’s events.
Sourcepub fn iter_logs_mut(&mut self) -> impl Iterator<Item = &mut LogEvent>
pub fn iter_logs_mut(&mut self) -> impl Iterator<Item = &mut LogEvent>
Iterate over references to the logs in this array.
Sourcepub fn for_each_metadata_mut(&mut self, f: impl FnMut(&mut EventMetadata))
pub fn for_each_metadata_mut(&mut self, f: impl FnMut(&mut EventMetadata))
Applies a closure to each event’s metadata in this array.
Trait Implementations§
Source§impl AddBatchNotifier for EventArray
impl AddBatchNotifier for EventArray
Source§fn add_batch_notifier(&mut self, batch: BatchNotifier)
fn add_batch_notifier(&mut self, batch: BatchNotifier)
Source§impl Bufferable for EventArray
impl Bufferable for EventArray
Source§fn is_fully_encodable(&self) -> bool
fn is_fully_encodable(&self) -> bool
Reuses the same budget walk as the encode-time gate, so the routing decision and the eventual encode can never disagree about what is persistable.
Source§fn filter_unencodable(self) -> Option<Self>
fn filter_unencodable(self) -> Option<Self>
None if nothing remains worth writing. Read moreSource§impl ByteSizeOf for EventArray
impl ByteSizeOf for EventArray
Source§impl Clone for EventArray
impl Clone for EventArray
Source§fn clone(&self) -> EventArray
fn clone(&self) -> EventArray
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventArray
impl Debug for EventArray
Source§impl Encodable for EventArray
impl Encodable for EventArray
Source§fn encode<B>(self, buffer: &mut B) -> Result<(), Self::EncodeError>where
B: BufMut,
fn encode<B>(self, buffer: &mut B) -> Result<(), Self::EncodeError>where
B: BufMut,
§Errors
Returns EncodeError::NestingTooDeep if any contained event’s value or metadata
exceeds MAX_VALUE_NESTING_FRAMES. This is all-or-nothing: a single
over-budget event fails the entire batch, because a partially-encoded
EventArray reaching disk would trip prost’s recursion limit on decode and
corrupt the buffer.
Callers that want graceful per-item drop with telemetry and
EventStatus::Rejected must run [Bufferable::filter_unencodable] first.
SenderAdapter::send/try_send already does this on the disk-v2 path, so the
NestingTooDeep arm is unreachable from any current production call site — it
is defense-in-depth for a future caller that bypasses SenderAdapter.
Returns EncodeError::BufferTooSmall if the buffer cannot hold the encoded
output.
type Metadata = EventEncodableMetadata
type EncodeError = EncodeError
type DecodeError = DecodeError
Source§fn get_metadata() -> Self::Metadata
fn get_metadata() -> Self::Metadata
Source§fn can_decode(metadata: Self::Metadata) -> bool
fn can_decode(metadata: Self::Metadata) -> bool
Source§fn decode<B>(
metadata: Self::Metadata,
buffer: B,
) -> Result<Self, Self::DecodeError>where
B: Buf + Clone,
fn decode<B>(
metadata: Self::Metadata,
buffer: B,
) -> Result<Self, Self::DecodeError>where
B: Buf + Clone,
§fn encoded_size(&self) -> Option<usize>
fn encoded_size(&self) -> Option<usize>
Source§impl EstimatedJsonEncodedSizeOf for EventArray
impl EstimatedJsonEncodedSizeOf for EventArray
fn estimated_json_encoded_size_of(&self) -> JsonSize
Source§impl EventContainer for EventArray
impl EventContainer for EventArray
Source§type IntoIter = EventArrayIntoIter
type IntoIter = EventArrayIntoIter
Iterator used to turn this container into events.Source§fn into_events(self) -> Self::IntoIter
fn into_events(self) -> Self::IntoIter
Event.Source§impl EventCount for EventArray
impl EventCount for EventArray
fn event_count(&self) -> usize
Source§impl EventDataEq for EventArray
impl EventDataEq for EventArray
fn event_data_eq(&self, other: &Self) -> bool
Source§impl Finalizable for EventArray
impl Finalizable for EventArray
Source§fn take_finalizers(&mut self) -> EventFinalizers
fn take_finalizers(&mut self) -> EventFinalizers
Source§fn take_finalizer_groups(&mut self) -> EventFinalizerGroups
fn take_finalizer_groups(&mut self) -> EventFinalizerGroups
Source§impl From<Event> for EventArray
impl From<Event> for EventArray
Source§impl From<EventArray> for EventArray
impl From<EventArray> for EventArray
Source§fn from(events: EventArray) -> Self
fn from(events: EventArray) -> Self
Source§impl From<EventArray> for EventArray
impl From<EventArray> for EventArray
Source§fn from(events: EventArray) -> Self
fn from(events: EventArray) -> Self
Source§impl From<LogEvent> for EventArray
impl From<LogEvent> for EventArray
Source§impl From<Metric> for EventArray
impl From<Metric> for EventArray
Source§impl From<SourceSenderItem> for EventArray
impl From<SourceSenderItem> for EventArray
Source§fn from(val: SourceSenderItem) -> Self
fn from(val: SourceSenderItem) -> Self
Source§impl From<TraceEvent> for EventArray
impl From<TraceEvent> for EventArray
Source§fn from(trace: TraceEvent) -> Self
fn from(trace: TraceEvent) -> Self
Source§impl From<Vec<Metric>> for EventArray
impl From<Vec<Metric>> for EventArray
Source§fn from(array: MetricArray) -> Self
fn from(array: MetricArray) -> Self
Source§impl GroupedFinalizable for EventArray
impl GroupedFinalizable for EventArray
Source§fn merge_finalizer_groups(&mut self, finalizers: EventFinalizerGroups)
fn merge_finalizer_groups(&mut self, finalizers: EventFinalizerGroups)
Source§impl PartialEq for EventArray
impl PartialEq for EventArray
impl StructuralPartialEq for EventArray
Auto Trait Implementations§
impl Freeze for EventArray
impl !RefUnwindSafe for EventArray
impl Send for EventArray
impl Sync for EventArray
impl Unpin for EventArray
impl UnsafeUnpin for EventArray
impl !UnwindSafe for EventArray
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
T in a tonic::Request§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
§fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more