pub struct ApptrailEventsClient {
pub region: String,
/* private fields */
}Expand description
The Apptrail Application Events Client lets you send audit logs from your Rust applications to your customers.
§Learn more
Fields§
§region: StringImplementations§
Source§impl ApptrailEventsClient
impl ApptrailEventsClient
Sourcepub fn new<T>(region: T, api_key: T) -> Result<Self, Box<dyn Error>>where
T: ToString,
pub fn new<T>(region: T, api_key: T) -> Result<Self, Box<dyn Error>>where
T: ToString,
Create a new events client. Instantiate this once at the top of your application and reuse it.
§Arguments
§region
The Apptrail region to send events to. Create a single instance per region. Regions are specified as strings, e.g. us-west-2.
Learn more about Apptrail regions.
§api_key
Your Apptrail secret API Key. You can generate and retrieve API Keys from the Apptrail Dashboard. Learn more about managing API Keys.
Sourcepub async fn put_event(
&mut self,
event: &ApptrailEvent,
) -> Result<(), Box<dyn Error>>
pub async fn put_event( &mut self, event: &ApptrailEvent, ) -> Result<(), Box<dyn Error>>
Send a single audit log to Apptrail.
Sourcepub async fn put_events(
&mut self,
events: &Vec<&ApptrailEvent>,
) -> Result<(), Box<dyn Error>>
pub async fn put_events( &mut self, events: &Vec<&ApptrailEvent>, ) -> Result<(), Box<dyn Error>>
Log multiple audit events to Apptrail. You can pass up to 1000 events to this method. To log more events, make multiple calls to this method.
Trait Implementations§
Source§impl Clone for ApptrailEventsClient
impl Clone for ApptrailEventsClient
Source§fn clone(&self) -> ApptrailEventsClient
fn clone(&self) -> ApptrailEventsClient
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 moreAuto Trait Implementations§
impl !Freeze for ApptrailEventsClient
impl !RefUnwindSafe for ApptrailEventsClient
impl Send for ApptrailEventsClient
impl !Sync for ApptrailEventsClient
impl Unpin for ApptrailEventsClient
impl !UnwindSafe for ApptrailEventsClient
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