pub struct ServiceCapability { /* private fields */ }
Expand description
A service capability, which may be routed between components. Created by
Capability::service
.
Implementations§
Source§impl ServiceCapability
impl ServiceCapability
Sourcepub fn as_(self, as_: impl Into<String>) -> Self
pub fn as_(self, as_: impl Into<String>) -> Self
The name the targets will see the service capability as.
Sourcepub fn path(self, path: impl Into<String>) -> Self
pub fn path(self, path: impl Into<String>) -> Self
The path at which this service capability will be provided or used. Only relevant if the route’s source or target is a local component, as these are the only components that realm builder will generate a modern component manifest for.
Sourcepub fn optional(self) -> Self
pub fn optional(self) -> Self
Marks the availability of this capability as “optional”, which allows either this or a
parent offer to have a source of void
.
Sourcepub fn availability_same_as_target(self) -> Self
pub fn availability_same_as_target(self) -> Self
Marks the availability of this capability to be the same as the availability expectations set in the target.
Trait Implementations§
Source§impl Clone for ServiceCapability
impl Clone for ServiceCapability
Source§fn clone(&self) -> ServiceCapability
fn clone(&self) -> ServiceCapability
Returns a copy 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 ServiceCapability
impl Debug for ServiceCapability
Source§impl Into<Capability> for ServiceCapability
impl Into<Capability> for ServiceCapability
Source§fn into(self) -> Capability
fn into(self) -> Capability
Converts this type into the (usually inferred) input type.
Source§impl PartialEq for ServiceCapability
impl PartialEq for ServiceCapability
impl StructuralPartialEq for ServiceCapability
Auto Trait Implementations§
impl Freeze for ServiceCapability
impl RefUnwindSafe for ServiceCapability
impl Send for ServiceCapability
impl Sync for ServiceCapability
impl Unpin for ServiceCapability
impl UnwindSafe for ServiceCapability
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)