[][src]Struct homeassistant::HomeAssistantAPI

pub struct HomeAssistantAPI { /* fields omitted */ }

Implementations

impl HomeAssistantAPI[src]

pub fn new(instance_url: String, client_id: String) -> Arc<RwLock<Self>>[src]

pub fn set_oauth_token(
    &mut self,
    access_token: String,
    expires_in: u32,
    refresh_token: String
)
[src]

pub fn set_long_lived_token(&mut self, token: String)[src]

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

pub async fn access_token<'_>(
    &'_ mut self,
    code: String,
    client_id: String
) -> Result<GetAccessTokenResponse, Error>
[src]

pub async fn get_rest_client<'_>(&'_ self) -> Rest[src]

pub async fn get_native_client_from_config<'_>(
    &'_ self,
    config: NativeAppConfig
) -> NativeApp
[src]

pub async fn get_native_client<'_>(&'_ self) -> NativeApp[src]

Trait Implementations

impl Debug for HomeAssistantAPI[src]

Auto Trait Implementations

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

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.