[][src]Struct basket::Basket

pub struct Basket {
    pub api_key: Arc<String>,
    pub basket_url: Arc<Url>,
    pub client: Client,
}

Fields

api_key: Arc<String>basket_url: Arc<Url>client: Client

Implementations

impl Basket[src]

pub fn new(api_key: impl Into<String>, basket_url: Url) -> Self[src]

impl Basket[src]

pub async fn subscribe<'_>(
    &'_ self,
    email: impl Into<String>,
    newsletters: Vec<String>,
    opts: Option<SubscribeOpts>
) -> Result<(), Error>
[src]

pub async fn subscribe_private<'_>(
    &'_ self,
    email: impl Into<String>,
    newsletters: Vec<String>,
    opts: Option<SubscribeOpts>
) -> Result<(), Error>
[src]

pub async fn unsubscribe<'_>(
    &'_ self,
    token: impl AsRef<str>,
    newsletters: Vec<String>,
    optout: YesNo
) -> Result<(), Error>
[src]

pub async fn get_user<'_>(
    &'_ self,
    token: impl AsRef<str>
) -> Result<Value, Error>
[src]

pub async fn update_user<'_>(
    &'_ self,
    email: impl Into<String>,
    token: impl AsRef<str>,
    opts: Option<UpdateUserOpts>
) -> Result<(), Error>
[src]

pub async fn newsletters<'_>(&'_ self) -> Result<Value, Error>[src]

pub async fn debug_user<'_>(
    &'_ self,
    email: impl AsRef<str>,
    supertoken: impl AsRef<str>
) -> Result<Value, Error>
[src]

pub async fn lookup_user<'_>(
    &'_ self,
    email: impl AsRef<str>
) -> Result<Value, Error>
[src]

pub async fn recover<'_>(
    &'_ self,
    email: impl Into<String>
) -> Result<(), Error>
[src]

Trait Implementations

impl Clone for Basket[src]

Auto Trait Implementations

impl !RefUnwindSafe for Basket

impl Send for Basket

impl Sync for Basket

impl Unpin for Basket

impl !UnwindSafe for Basket

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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 = Infallible

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.