pub struct CapabilityId(/* private fields */);Expand description
A capability id such as kv.prefix_list, cast.to_uuid or fn:max.
Lower-case ASCII, digits, _, . as the namespace separator and : (as in fn:max). An id
names a behaviour or feature, never a backend, and never changes meaning: a change in meaning is
a new id. Ordering is plain string ordering so files diff stably.
Implementations§
Source§impl CapabilityId
impl CapabilityId
Sourcepub fn is_under(&self, other: &CapabilityId) -> bool
pub fn is_under(&self, other: &CapabilityId) -> bool
Whether this id is other or sits beneath it by name (kv.prefix_list.exactly_once is
under kv.prefix_list). Naming only: it says nothing about which implies which; that is a
chain the vocabulary declares, not a string prefix.
Trait Implementations§
Source§impl Clone for CapabilityId
impl Clone for CapabilityId
Source§impl Debug for CapabilityId
impl Debug for CapabilityId
Source§impl Display for CapabilityId
impl Display for CapabilityId
impl Eq for CapabilityId
Source§impl FromStr for CapabilityId
impl FromStr for CapabilityId
Source§impl Hash for CapabilityId
impl Hash for CapabilityId
Source§impl Ord for CapabilityId
impl Ord for CapabilityId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CapabilityId
impl PartialEq for CapabilityId
Source§impl PartialOrd for CapabilityId
impl PartialOrd for CapabilityId
impl StructuralPartialEq for CapabilityId
Auto Trait Implementations§
impl Freeze for CapabilityId
impl RefUnwindSafe for CapabilityId
impl Send for CapabilityId
impl Sync for CapabilityId
impl Unpin for CapabilityId
impl UnsafeUnpin for CapabilityId
impl UnwindSafe for CapabilityId
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