Skip to main content

Crate outlit

Crate outlit 

Source
Expand description

Outlit analytics SDK for Rust.

§Example

use outlit::{Outlit, email};
use std::time::Duration;

#[tokio::main]
async fn main() -> Result<(), outlit::Error> {
    let client = Outlit::builder("pk_xxx")
        .flush_interval(Duration::from_secs(5))
        .build()?;

    client.track("signup", email("user@example.com"))
        .property("plan", "pro")
        .send()
        .await?;

    client.shutdown().await?;
    Ok(())
}

Re-exports§

pub use types::BillingStatus;
pub use types::IngestPayload;
pub use types::IngestResponse;
pub use types::JourneyStage;
pub use types::SourceType;
pub use types::TrackerEvent;

Modules§

types
Event types and serialization.

Structs§

Config
Outlit client configuration.
CustomerMethods
Customer billing methods.
Email
Email identity wrapper.
Fingerprint
Fingerprint identity wrapper (device identifier).
Outlit
Outlit analytics client.
OutlitBuilder
Builder for Outlit client.
SendableBilling
Sendable billing event builder.
SendableIdentify
Sendable identify event builder.
SendableStage
Sendable stage event builder.
SendableTrack
Sendable track event builder.
UserId
User ID identity wrapper.
UserMethods
User journey stage methods.

Enums§

Error
Errors that can occur when using the Outlit SDK.

Functions§

email
Create an email identity.
fingerprint
Create a fingerprint identity (device identifier).
user_id
Create a user ID identity.