pub struct Feature { /* private fields */ }Expand description
Features are distinct markers or indicators of a particular technology or platform that’s present.
In general, features represent the type of environment that the application is running in, such as the Kubernetes feature being present indicating that the application is running in Kubernetes, and so on.
Implementations§
Source§impl Feature
impl Feature
Sourcepub const HostMappedProcfs: Feature
pub const HostMappedProcfs: Feature
Host-mapped procfs.
This implies that we’re in a containerized environment and the host’s procfs (/proc) has been mapped into the
container using a /host prefix, resulting in a /host/proc path.
Sourcepub const HostMappedCgroupfs: Feature
pub const HostMappedCgroupfs: Feature
Host-mapped cgroupfs.
This implies that we’re in a containerized environment and the host’s cgroupfs (/sys/fs/cgroup) has been
mapped into the container using a /host prefix, resulting in a /host/sys/fs/cgroup path.
Sourcepub const LegacyCgroupfsRoot: Feature
pub const LegacyCgroupfsRoot: Feature
Legacy cgroupfs root.
This implies that we’re running directly on a host whose cgroups v1 hierarchy sits at /cgroup rather than
/sys/fs/cgroup, which is the layout used by older Amazon Linux hosts. This is never detected in a
containerized environment, where the host’s hierarchy is reached through a host-mapped path instead.
Sourcepub const Containerd: Feature
pub const Containerd: Feature
Containerd.
Sourcepub const fn all_bits() -> Self
pub const fn all_bits() -> Self
Returns a bitmask that contains all values.
This will include bits that do not have any flags.
Use ::all_flags() if you only want to use flags.
Sourcepub const fn is_all_bits(&self) -> bool
pub const fn is_all_bits(&self) -> bool
Returns true if the bitmask contains all values.
This will check for bits == !0,
use .is_all_flags() if you only want to check for all flags
Sourcepub const fn is_all_flags(&self) -> bool
pub const fn is_all_flags(&self) -> bool
Returns true if the bitmask contains all flags.
This will fail if any unused bit is set,
consider using .truncate() first.
Sourcepub const fn all() -> Self
👎Deprecated: Please use the ::all_bits() constructor
pub const fn all() -> Self
::all_bits() constructorReturns a bitmask that contains all values.
This will include bits that do not have any flags.
Use ::all_flags() if you only want to use flags.
Sourcepub const fn is_all(&self) -> bool
👎Deprecated: Please use the .is_all_bits() method
pub const fn is_all(&self) -> bool
.is_all_bits() methodReturns true if the bitmask contains all values.
This will check for bits == !0,
use .is_all_flags() if you only want to check for all flags
Sourcepub const fn full() -> Self
👎Deprecated: Please use the ::all_flags() constructor
pub const fn full() -> Self
::all_flags() constructorReturns a bitmask that contains all flags.
Sourcepub const fn is_full(&self) -> bool
👎Deprecated: Please use the .is_all_flags() method
pub const fn is_full(&self) -> bool
.is_all_flags() methodReturns true if the bitmask contains all flags.
This will fail if any unused bit is set,
consider using .truncate() first.
Sourcepub const fn truncate(&self) -> Self
pub const fn truncate(&self) -> Self
Returns a bitmask that only has bits corresponding to flags
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true if self intersects with any value in other,
or if other does not contain any values.
This is equivalent to (self & other) != 0 || other == 0.
Trait Implementations§
Source§impl BitAndAssign for Feature
impl BitAndAssign for Feature
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOrAssign for Feature
impl BitOrAssign for Feature
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXorAssign for Feature
impl BitXorAssign for Feature
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Ord for Feature
impl Ord for Feature
Source§impl PartialOrd for Feature
impl PartialOrd for Feature
impl Copy for Feature
impl Eq for Feature
impl StructuralPartialEq for Feature
Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnwindSafe for Feature
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more