#[repr(u8)]pub enum Signal {
Logs = 0,
Traces = 1,
Metrics = 2,
}Expand description
Which signal a frame belongs to.
Stored as one byte rather than the string the block directories use, because a frame header should be fixed-width — a variable-length field in front of a length field is how a parser gets confused about where the body starts.
Variants§
Implementations§
Source§impl Signal
impl Signal
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The directory name block::publish uses for this signal. Kept in step
with the strings the block layer already writes; a mismatch here would
put a watermark on the wrong signal’s blocks.
Sourcepub fn named(s: &str) -> Option<Signal>
pub fn named(s: &str) -> Option<Signal>
The inverse of Signal::as_str, so a caller holding a
crate::signal::SignalBuilder’s SIGNAL does not have to keep a
fourth copy of the mapping in step with the other three.
fn from_u8(b: u8) -> Option<Signal>
Sourcepub fn index(self) -> usize
pub fn index(self) -> usize
Where this signal’s watermark sits in Watermarks.
Trait Implementations§
impl Copy for Signal
impl Eq for Signal
Source§impl Ord for Signal
impl Ord for Signal
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Signal
impl PartialOrd for Signal
impl StructuralPartialEq for Signal
Auto Trait Implementations§
impl Freeze for Signal
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnsafeUnpin for Signal
impl UnwindSafe for Signal
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].