pub struct RuntimeServicePorts { /* private fields */ }Expand description
Narrow, typed ports composed by the host. An absent port is meaningful and
produces a stable capability error through the corresponding require_*
accessor; there is no string-keyed service locator.
Implementations§
Source§impl RuntimeServicePorts
impl RuntimeServicePorts
pub fn with_call(self, service: Rc<dyn RuntimeCallService>) -> Self
pub fn call(&self) -> Option<&Rc<dyn RuntimeCallService>>
pub fn require_call( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeCallService>, RuntimeCapabilityError>
pub fn with_builtin(self, service: Rc<dyn RuntimeBuiltinService>) -> Self
pub fn builtin(&self) -> Option<&Rc<dyn RuntimeBuiltinService>>
pub fn require_builtin( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeBuiltinService>, RuntimeCapabilityError>
pub fn with_workspace(self, service: Rc<dyn RuntimeWorkspaceService>) -> Self
pub fn workspace(&self) -> Option<&Rc<dyn RuntimeWorkspaceService>>
pub fn require_workspace( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeWorkspaceService>, RuntimeCapabilityError>
Sourcepub fn without_workspace(self) -> Self
pub fn without_workspace(self) -> Self
Remove an inherited caller-workspace service before entering an isolated procedure frame. The callee may then install its own scoped workspace authority without exposing or mutating the caller frame.
pub fn with_object(self, service: Rc<dyn RuntimeObjectService>) -> Self
pub fn object(&self) -> Option<&Rc<dyn RuntimeObjectService>>
pub fn require_object( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeObjectService>, RuntimeCapabilityError>
pub fn with_host(self, service: Rc<dyn RuntimeHostService>) -> Self
pub fn host(&self) -> Option<&Rc<dyn RuntimeHostService>>
pub fn require_host( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeHostService>, RuntimeCapabilityError>
pub fn with_error(self, service: Rc<dyn RuntimeErrorService>) -> Self
pub fn error(&self) -> Option<&Rc<dyn RuntimeErrorService>>
pub fn require_error( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeErrorService>, RuntimeCapabilityError>
pub fn with_acceleration( self, service: Rc<dyn RuntimeAccelerationService>, ) -> Self
pub fn acceleration(&self) -> Option<&Rc<dyn RuntimeAccelerationService>>
pub fn require_acceleration( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeAccelerationService>, RuntimeCapabilityError>
pub fn with_placement(self, service: Rc<dyn RuntimePlacementService>) -> Self
pub fn placement(&self) -> Option<&Rc<dyn RuntimePlacementService>>
pub fn require_placement( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimePlacementService>, RuntimeCapabilityError>
pub fn with_native(self, service: Rc<dyn RuntimeNativeService>) -> Self
pub fn native(&self) -> Option<&Rc<dyn RuntimeNativeService>>
pub fn require_native( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeNativeService>, RuntimeCapabilityError>
pub fn with_foreign(self, service: Rc<dyn RuntimeForeignService>) -> Self
pub fn foreign(&self) -> Option<&Rc<dyn RuntimeForeignService>>
pub fn require_foreign( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeForeignService>, RuntimeCapabilityError>
pub fn with_parallel(self, service: Rc<dyn RuntimeParallelService>) -> Self
pub fn parallel(&self) -> Option<&Rc<dyn RuntimeParallelService>>
pub fn require_parallel( &self, operation: impl Into<String>, ) -> Result<&Rc<dyn RuntimeParallelService>, RuntimeCapabilityError>
Trait Implementations§
Source§impl Clone for RuntimeServicePorts
impl Clone for RuntimeServicePorts
Source§impl Debug for RuntimeServicePorts
impl Debug for RuntimeServicePorts
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeServicePorts
impl !Send for RuntimeServicePorts
impl !Sync for RuntimeServicePorts
impl !UnwindSafe for RuntimeServicePorts
impl Freeze for RuntimeServicePorts
impl Unpin for RuntimeServicePorts
impl UnsafeUnpin for RuntimeServicePorts
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.