#[non_exhaustive]pub struct EdgeSnapshotTelemetry { /* private fields */ }Expand description
Structured snapshot describing the state of a single edge.
These snapshots are typically taken by runtimes when they want to record backpressure or queue depth for a link between nodes.
Implementations§
Source§impl EdgeSnapshotTelemetry
impl EdgeSnapshotTelemetry
Sourcepub const fn new(
graph_id: GraphInstanceId,
edge_index: EdgeIndex,
source_node_index: NodeIndex,
target_node_index: NodeIndex,
timestamp_ns: u64,
current_occupancy: u32,
soft_watermark: u32,
hard_watermark: u32,
watermark_state: WatermarkState,
) -> Self
pub const fn new( graph_id: GraphInstanceId, edge_index: EdgeIndex, source_node_index: NodeIndex, target_node_index: NodeIndex, timestamp_ns: u64, current_occupancy: u32, soft_watermark: u32, hard_watermark: u32, watermark_state: WatermarkState, ) -> Self
Creates a new snapshot record for a single edge.
Sourcepub const fn graph_id(&self) -> &GraphInstanceId
pub const fn graph_id(&self) -> &GraphInstanceId
Returns the identifier of the graph instance this edge belongs to.
Sourcepub const fn edge_index(&self) -> &EdgeIndex
pub const fn edge_index(&self) -> &EdgeIndex
Returns the index of the edge within the graph.
Sourcepub const fn source_node_index(&self) -> &NodeIndex
pub const fn source_node_index(&self) -> &NodeIndex
Returns the index of the source node for this edge.
Sourcepub const fn target_node_index(&self) -> &NodeIndex
pub const fn target_node_index(&self) -> &NodeIndex
Returns the index of the target node for this edge.
Sourcepub const fn timestamp_ns(&self) -> &u64
pub const fn timestamp_ns(&self) -> &u64
Returns the snapshot timestamp in nanoseconds since an arbitrary epoch.
Sourcepub const fn current_occupancy(&self) -> &u32
pub const fn current_occupancy(&self) -> &u32
Returns the current occupancy of the edge buffer.
Sourcepub const fn soft_watermark(&self) -> &u32
pub const fn soft_watermark(&self) -> &u32
Returns the configured soft watermark for this edge.
Sourcepub const fn hard_watermark(&self) -> &u32
pub const fn hard_watermark(&self) -> &u32
Returns the configured hard watermark for this edge.
Sourcepub const fn watermark_state(&self) -> &WatermarkState
pub const fn watermark_state(&self) -> &WatermarkState
Returns the current watermark state relative to the configured thresholds.
Trait Implementations§
Source§impl Clone for EdgeSnapshotTelemetry
impl Clone for EdgeSnapshotTelemetry
Source§fn clone(&self) -> EdgeSnapshotTelemetry
fn clone(&self) -> EdgeSnapshotTelemetry
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 EdgeSnapshotTelemetry
impl Debug for EdgeSnapshotTelemetry
impl Copy for EdgeSnapshotTelemetry
Auto Trait Implementations§
impl Freeze for EdgeSnapshotTelemetry
impl RefUnwindSafe for EdgeSnapshotTelemetry
impl Send for EdgeSnapshotTelemetry
impl Sync for EdgeSnapshotTelemetry
impl Unpin for EdgeSnapshotTelemetry
impl UnsafeUnpin for EdgeSnapshotTelemetry
impl UnwindSafe for EdgeSnapshotTelemetry
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