Struct spin_app::AppTrigger
source · pub struct AppTrigger<'a> {
pub app: &'a App<'a>,
/* private fields */
}
Expand description
An AppTrigger
holds configuration for a Spin application trigger.
Fields§
§app: &'a App<'a>
The app this trigger belongs to.
Implementations§
source§impl<'a> AppTrigger<'a>
impl<'a> AppTrigger<'a>
sourcepub fn trigger_type(&self) -> &str
pub fn trigger_type(&self) -> &str
Returns the Trigger’s type.
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.
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.
Auto Trait Implementations§
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§
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.