pub struct EventsClient { /* private fields */ }Expand description
Thin client for POST /v1/events. The route returns an empty 202; transport
errors (network failure, 5xx after retries) propagate to the caller.
Implementations§
Source§impl EventsClient
impl EventsClient
pub fn new(http: Arc<HttpClient>) -> Self
Sourcepub fn post(
&self,
envelope: &EventEnvelope,
scope: Option<&str>,
) -> RovenueResult<()>
pub fn post( &self, envelope: &EventEnvelope, scope: Option<&str>, ) -> RovenueResult<()>
POST the serialized envelope to /v1/events. The optional scope
travels in the X-Rovenue-App-User-Id header so the server can resolve
the current user; the canonical subscriber identity is carried in the
envelope body (subscriberId).
Auto Trait Implementations§
impl Freeze for EventsClient
impl !RefUnwindSafe for EventsClient
impl Send for EventsClient
impl Sync for EventsClient
impl Unpin for EventsClient
impl !UnwindSafe for EventsClient
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