[][src]Struct osauth::NoAuth

pub struct NoAuth { /* fields omitted */ }

Authentication type that provides no authentication.

This type always uses a pre-defined endpoint and sends no authenticaiton information:

let auth = osauth::NoAuth::new("https://cloud.local/baremetal")
    .expect("Invalid auth URL");
let session = osauth::Session::new(auth);

Implementations

impl NoAuth[src]

pub fn new<U>(endpoint: U) -> Result<NoAuth, Error> where
    U: IntoUrl
[src]

Create a new fake authentication method using a fixed endpoint.

This endpoint will be returned in response to all get_endpoint calls of the AuthType trait.

pub fn new_with_client<U>(endpoint: U, client: Client) -> Result<NoAuth, Error> where
    U: IntoUrl
[src]

Create a new fake authentication method using a fixed endpoint and an HTTP client.

pub fn new_without_endpoint(client: Client) -> NoAuth[src]

Create a new fake authentication method without an endpoint.

All calls to get_endpoint will fail. This option is only useful with endpoint overrides.

Trait Implementations

impl AuthType for NoAuth[src]

pub fn request<'life0, 'async_trait>(
    &'life0 self,
    method: Method,
    url: Url
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Create a request.

pub fn get_endpoint<'life0, 'async_trait>(
    &'life0 self,
    service_type: String,
    _filters: EndpointFilters
) -> Pin<Box<dyn Future<Output = Result<Url, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Get a predefined endpoint for all service types

pub fn refresh<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

This call does nothing for NoAuth.

impl Clone for NoAuth[src]

impl Debug for NoAuth[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> 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.