pub enum CapabilityId<'a> {
Show 16 variants
Service(&'a Name),
Protocol(&'a Name),
Directory(&'a Name),
UsedService(Path),
UsedProtocol(Path),
UsedDirectory(Path),
UsedStorage(Path),
UsedEventStream(Path),
UsedConfiguration(&'a Name),
UsedRunner(&'a Name),
Storage(&'a Name),
Runner(&'a Name),
Resolver(&'a Name),
EventStream(&'a Name),
Dictionary(&'a Name),
Configuration(&'a Name),
}
Expand description
A name/identity of a capability exposed/offered to another component.
Exposed or offered capabilities have an identifier whose format depends on the capability type. For directories and services this is a path, while for storage this is a storage name. Paths and storage names, however, are in different conceptual namespaces, and can’t collide with each other.
This enum allows such names to be specified disambiguating what namespace they are in.
Variants§
Service(&'a Name)
Protocol(&'a Name)
Directory(&'a Name)
UsedService(Path)
UsedProtocol(Path)
UsedDirectory(Path)
UsedStorage(Path)
UsedEventStream(Path)
UsedConfiguration(&'a Name)
UsedRunner(&'a Name)
Storage(&'a Name)
Runner(&'a Name)
Resolver(&'a Name)
EventStream(&'a Name)
Dictionary(&'a Name)
Configuration(&'a Name)
Implementations§
Source§impl<'a> CapabilityId<'a>
impl<'a> CapabilityId<'a>
Sourcepub fn get_dir_path(&self) -> Option<NamespacePath>
pub fn get_dir_path(&self) -> Option<NamespacePath>
Return the directory containing the capability, if this capability takes a target path.
Sourcepub fn from_use(use_: &'a Use) -> Result<Vec<Self>, Error>
pub fn from_use(use_: &'a Use) -> Result<Vec<Self>, Error>
Given a Use clause, return the set of target identifiers.
When only one capability identifier is specified, the target identifier name is derived using the “path” clause. If a “path” clause is not specified, the target identifier is the same name as the source.
When multiple capability identifiers are specified, the target names are the same as the source names.
pub fn from_capability(capability: &'a Capability) -> Result<Vec<Self>, Error>
Sourcepub fn from_offer_expose<T>(clause: &'a T) -> Result<Vec<Self>, Error>
pub fn from_offer_expose<T>(clause: &'a T) -> Result<Vec<Self>, Error>
Given an Offer or Expose clause, return the set of target identifiers.
When only one capability identifier is specified, the target identifier name is derived using the “as” clause. If an “as” clause is not specified, the target identifier is the same name as the source.
When multiple capability identifiers are specified, the target names are the same as the source names.
Trait Implementations§
Source§impl<'a> Clone for CapabilityId<'a>
impl<'a> Clone for CapabilityId<'a>
Source§fn clone(&self) -> CapabilityId<'a>
fn clone(&self) -> CapabilityId<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for CapabilityId<'a>
impl<'a> Debug for CapabilityId<'a>
Source§impl Display for CapabilityId<'_>
impl Display for CapabilityId<'_>
Source§impl<'a> Hash for CapabilityId<'a>
impl<'a> Hash for CapabilityId<'a>
Source§impl<'a> PartialEq for CapabilityId<'a>
impl<'a> PartialEq for CapabilityId<'a>
impl<'a> Eq for CapabilityId<'a>
impl<'a> StructuralPartialEq for CapabilityId<'a>
Auto Trait Implementations§
impl<'a> Freeze for CapabilityId<'a>
impl<'a> RefUnwindSafe for CapabilityId<'a>
impl<'a> Send for CapabilityId<'a>
impl<'a> Sync for CapabilityId<'a>
impl<'a> Unpin for CapabilityId<'a>
impl<'a> UnwindSafe for CapabilityId<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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.