[][src]Struct abuseipdb::ClientBuilder

pub struct ClientBuilder { /* fields omitted */ }

A builder to create a configured AbuseIPDB client.

Methods

impl ClientBuilder[src]

pub fn new() -> Self[src]

Create the client builder with the default HTTP client.

pub fn with_client(client: Client) -> Self[src]

Creates the client builder, given a pre-existing HTTP client.

pub fn base_url<S>(self, base_url: Url) -> Self[src]

Sets the base URL for the AbuseIPDB API.

pub fn user_agent<S>(self, user_agent: S) -> Self where
    S: Into<Cow<'static, str>>, 
[src]

Set the user agent the client will use when making a request to AbuseIPDB.

pub fn api_key<S>(self, api_key: S) -> Self where
    S: Into<Cow<'static, str>>, 
[src]

Sets the API key to be used to authenticate when making a request AbuseIPDB.

pub fn build(self) -> Client[src]

Consumes the client builder and returns the built AbuseIPDB client.

Trait Implementations

impl Clone for ClientBuilder[src]

impl Default for ClientBuilder[src]

impl Debug for ClientBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]