pub struct PorcelainBuilder<T: CapabilityBound, R: ErrorReporter, C: ComponentInstanceInterface + 'static, const D: bool> { /* private fields */ }
Expand description
Builds a router that ensures the capability request has an availability
strength that is at least the provided availability
. A default Request
is populated with metadata_fn
if the client passes a None
Request
.
Implementations§
Source§impl<T: CapabilityBound, R: ErrorReporter, C: ComponentInstanceInterface + 'static, const D: bool> PorcelainBuilder<T, R, C, D>
impl<T: CapabilityBound, R: ErrorReporter, C: ComponentInstanceInterface + 'static, const D: bool> PorcelainBuilder<T, R, C, D>
Sourcepub fn availability(self, a: Availability) -> Self
pub fn availability(self, a: Availability) -> Self
The Availability attribute for this route. REQUIRED.
Sourcepub fn target(self, t: &Arc<C>) -> Self
pub fn target(self, t: &Arc<C>) -> Self
The identity of the component on behalf of whom this routing request is performed, if the
caller passes a None
request.
Either this or target_above_root
is REQUIRED.
Sourcepub fn target_above_root(self, t: &Arc<C::TopInstance>) -> Self
pub fn target_above_root(self, t: &Arc<C::TopInstance>) -> Self
The identity of the “above root” instance that is component manager itself.
Either this or target
is REQUIRED.
Sourcepub fn error_info<S>(self, r: S) -> Selfwhere
RouteRequestErrorInfo: From<S>,
pub fn error_info<S>(self, r: S) -> Selfwhere
RouteRequestErrorInfo: From<S>,
Object used to generate diagnostic information about the route that is logged if the route fails. This is usually a cm_rust type that is castable to RouteRequestErrorInfo REQUIRED.
Sourcepub fn error_reporter(self, r: R) -> Self
pub fn error_reporter(self, r: R) -> Self
The ErrorReporter used to log errors if routing fails. REQUIRED.
Trait Implementations§
Source§impl<R: ErrorReporter, T: CapabilityBound, C: ComponentInstanceInterface + 'static, const D: bool> From<PorcelainBuilder<T, R, C, D>> for Capability
impl<R: ErrorReporter, T: CapabilityBound, C: ComponentInstanceInterface + 'static, const D: bool> From<PorcelainBuilder<T, R, C, D>> for Capability
Source§fn from(b: PorcelainBuilder<T, R, C, D>) -> Self
fn from(b: PorcelainBuilder<T, R, C, D>) -> Self
Auto Trait Implementations§
impl<T, R, C, const D: bool> Freeze for PorcelainBuilder<T, R, C, D>where
R: Freeze,
impl<T, R, C, const D: bool> !RefUnwindSafe for PorcelainBuilder<T, R, C, D>
impl<T, R, C, const D: bool> Send for PorcelainBuilder<T, R, C, D>
impl<T, R, C, const D: bool> Sync for PorcelainBuilder<T, R, C, D>
impl<T, R, C, const D: bool> Unpin for PorcelainBuilder<T, R, C, D>where
R: Unpin,
impl<T, R, C, const D: bool> !UnwindSafe for PorcelainBuilder<T, R, C, D>
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, 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<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>
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>
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 more