Skip to main content

Client

Trait Client 

Source
pub trait Client {
    // Required method
    fn send<'life0, 'async_trait>(
        &'life0 self,
        write_key: String,
        msg: Message,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Client is a trait representing the HTTP transport layer of the analytics library.

Required Methods§

Source

fn send<'life0, 'async_trait>( &'life0 self, write_key: String, msg: Message, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a single message to Segment using the given write key.

A write_key is an API key for Segment’s tracking API. See Segment’s documentation for how to find this value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§