pub struct SamplingFlags(/* private fields */);Expand description
W3C Trace Context sampling flags byte.
Currently only the sampled flag (bit 0) is defined by the spec.
Implementations§
Source§impl SamplingFlags
impl SamplingFlags
Sourcepub const fn not_sampled() -> Self
pub const fn not_sampled() -> Self
Create flags with no bits set (not sampled).
Sourcepub const fn is_sampled(&self) -> bool
pub const fn is_sampled(&self) -> bool
Returns true when the sampled flag is set.
Trait Implementations§
Source§impl Clone for SamplingFlags
impl Clone for SamplingFlags
Source§fn clone(&self) -> SamplingFlags
fn clone(&self) -> SamplingFlags
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 SamplingFlags
impl Debug for SamplingFlags
Source§impl Default for SamplingFlags
impl Default for SamplingFlags
Source§fn default() -> SamplingFlags
fn default() -> SamplingFlags
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SamplingFlags
impl<'de> Deserialize<'de> for SamplingFlags
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SamplingFlags
impl Display for SamplingFlags
Source§impl Hash for SamplingFlags
impl Hash for SamplingFlags
Source§impl PartialEq for SamplingFlags
impl PartialEq for SamplingFlags
Source§impl Serialize for SamplingFlags
impl Serialize for SamplingFlags
impl Copy for SamplingFlags
impl Eq for SamplingFlags
impl StructuralPartialEq for SamplingFlags
Auto Trait Implementations§
impl Freeze for SamplingFlags
impl RefUnwindSafe for SamplingFlags
impl Send for SamplingFlags
impl Sync for SamplingFlags
impl Unpin for SamplingFlags
impl UnsafeUnpin for SamplingFlags
impl UnwindSafe for SamplingFlags
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> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP