Trait segment::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.

Implementors§