pub struct EventsApi<T> { /* private fields */ }Expand description
What the API declares under events.
Every method of it is issued through the transport it is handed.
Implementations§
Source§impl<T: Transport> EventsApi<T>
impl<T: Transport> EventsApi<T>
Sourcepub async fn get(
&self,
event_id: &str,
application_id: &str,
) -> Result<EventWithPayload, RequestError>
pub async fn get( &self, event_id: &str, application_id: &str, ) -> Result<EventWithPayload, RequestError>
events.get, GET /api/v1/events/{event_id}.
Get an event by its ID
Sourcepub async fn ingest(
&self,
body: EventPost,
) -> Result<IngestedEvent, RequestError>
pub async fn ingest( &self, body: EventPost, ) -> Result<IngestedEvent, RequestError>
events.ingest, POST /api/v1/event/.
Ingest an event
Sourcepub async fn list(
&self,
application_id: &str,
) -> Result<Vec<Event>, RequestError>
pub async fn list( &self, application_id: &str, ) -> Result<Vec<Event>, RequestError>
events.list, GET /api/v1/events/.
List latest events
Sourcepub async fn replay(
&self,
event_id: &str,
body: ReplayEvent,
) -> Result<(), RequestError>
pub async fn replay( &self, event_id: &str, body: ReplayEvent, ) -> Result<(), RequestError>
events.replay, POST /api/v1/events/{event_id}/replay.
Replay an event
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for EventsApi<T>where
T: Freeze,
impl<T> RefUnwindSafe for EventsApi<T>where
T: RefUnwindSafe,
impl<T> Send for EventsApi<T>where
T: Send,
impl<T> Sync for EventsApi<T>where
T: Sync,
impl<T> Unpin for EventsApi<T>where
T: Unpin,
impl<T> UnsafeUnpin for EventsApi<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for EventsApi<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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