pub struct AppTrigger<'a> {
pub app: &'a App,
/* private fields */
}
Expand description
An AppTrigger
holds configuration for a Spin application trigger.
Fields§
§app: &'a App
The app this trigger belongs to.
Implementations§
Source§impl<'a> AppTrigger<'a>
impl<'a> AppTrigger<'a>
Sourcepub fn trigger_type(&self) -> &'a str
pub fn trigger_type(&self) -> &'a str
Returns the Trigger’s type.
Sourcepub fn typed_config<Config: Deserialize<'a>>(&self) -> Result<Config>
pub fn typed_config<Config: Deserialize<'a>>(&self) -> Result<Config>
Deserializes this trigger’s configuration into a typed value.
Sourcepub fn component(&self) -> Result<AppComponent<'a>>
pub fn component(&self) -> Result<AppComponent<'a>>
Returns a reference to the AppComponent
configured for this trigger.
This is a convenience wrapper that looks up the component based on the ‘component’ metadata value which is conventionally a component ID.
Auto Trait Implementations§
impl<'a> Freeze for AppTrigger<'a>
impl<'a> RefUnwindSafe for AppTrigger<'a>
impl<'a> Send for AppTrigger<'a>
impl<'a> Sync for AppTrigger<'a>
impl<'a> Unpin for AppTrigger<'a>
impl<'a> UnwindSafe for AppTrigger<'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
Mutably borrows from an owned value. Read more
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 more