Struct dagpirs::Client[][src]

pub struct Client {
    pub token: String,
    pub http: Arc<HttpClient>,
    pub data: Data,
    pub image: Image,
}
Expand description

Asynchronous client for Dagpi

Fields

token: Stringhttp: Arc<HttpClient>data: Dataimage: Image

Implementations

Initialise a new Async Client

Example

use dagpirs::Client;
use tokio;
#[tokio::main]
async fn main() {
    let token = std::env::var("DAGPI_TOKEN").unwrap();
    let c = Client::new(&token).unwrap();
}

Trait Implementations

Defines the value type that corresponds to this TypeMapKey.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more