pub struct EventHandle {
pub id: String,
pub parent_id: Option<String>,
pub is_noop: bool,
}Expand description
Handle to an emitted event that allows updating it
Fields§
§id: StringUnique identifier for the event
parent_id: Option<String>Parent event ID if this is a child event
is_noop: boolWhether this is a no-op handle (when no event bus is available)
Implementations§
Source§impl EventHandle
impl EventHandle
Sourcepub async fn update(&self, event: AlienEvent) -> Result<()>
pub async fn update(&self, event: AlienEvent) -> Result<()>
Update the event with new data
Sourcepub async fn fail<E>(&self, error: AlienError<E>) -> Result<()>
pub async fn fail<E>(&self, error: AlienError<E>) -> Result<()>
Mark the event as failed with an error
Trait Implementations§
Source§impl Clone for EventHandle
impl Clone for EventHandle
Source§fn clone(&self) -> EventHandle
fn clone(&self) -> EventHandle
Returns a duplicate 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 EventHandle
impl Debug for EventHandle
Source§impl<'de> Deserialize<'de> for EventHandle
impl<'de> Deserialize<'de> for EventHandle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EventHandle
impl RefUnwindSafe for EventHandle
impl Send for EventHandle
impl Sync for EventHandle
impl Unpin for EventHandle
impl UnsafeUnpin for EventHandle
impl UnwindSafe for EventHandle
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