pub struct EventsResource { /* private fields */ }Expand description
Publishes and inspects Hot events.
Implementations§
Source§impl EventsResource
impl EventsResource
Sourcepub async fn publish(&self, body: impl Serialize) -> Result<JsonObject>
pub async fn publish(&self, body: impl Serialize) -> Result<JsonObject>
Publishes an event and returns the created event data (event_id, stream_id, …).
Sourcepub async fn call_hot(
&self,
fn_name: &str,
args: Vec<Value>,
opts: CallOptions<'_>,
) -> Result<Value>
pub async fn call_hot( &self, fn_name: &str, args: Vec<Value>, opts: CallOptions<'_>, ) -> Result<Value>
Publishes a hot:call event for fn_name with args and waits for the
run result, unwrapping a {"$ok": ...} result value.
Sourcepub async fn list(&self, query: &[(&str, &str)]) -> Result<JsonObject>
pub async fn list(&self, query: &[(&str, &str)]) -> Result<JsonObject>
Returns the event list envelope (data + pagination).
Sourcepub async fn get(&self, event_id: &str) -> Result<JsonObject>
pub async fn get(&self, event_id: &str) -> Result<JsonObject>
Returns a single event.
Sourcepub async fn get_runs(&self, event_id: &str) -> Result<JsonObject>
pub async fn get_runs(&self, event_id: &str) -> Result<JsonObject>
Returns the runs triggered by an event.
Auto Trait Implementations§
impl !RefUnwindSafe for EventsResource
impl !UnwindSafe for EventsResource
impl Freeze for EventsResource
impl Send for EventsResource
impl Sync for EventsResource
impl Unpin for EventsResource
impl UnsafeUnpin for EventsResource
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