Struct openstack::session::Session [−][src]
pub struct Session { /* fields omitted */ }An OpenStack API session.
The session object serves as a wrapper around an HTTP(s) client, handling authentication, accessing the service catalog and token refresh.
The session object also owns the endpoint interface to use.
Methods
impl Session[src]
impl Sessionpub fn new<Auth: AuthMethod + 'static>(auth_method: Auth) -> Session[src]
pub fn new<Auth: AuthMethod + 'static>(auth_method: Auth) -> SessionCreate a new session with a given authentication plugin.
The resulting session will use the default endpoint interface (usually, public).
pub fn set_endpoint_interface<S>(&mut self, endpoint_interface: S) where
S: Into<String>, [src]
pub fn set_endpoint_interface<S>(&mut self, endpoint_interface: S) where
S: Into<String>, Set endpoint interface to use.
This call clears the cached service information.
pub fn with_endpoint_interface<S>(self, endpoint_interface: S) -> Session where
S: Into<String>, [src]
pub fn with_endpoint_interface<S>(self, endpoint_interface: S) -> Session where
S: Into<String>, Convert this session into one using the given endpoint interface.
pub fn auth_method(&self) -> &AuthMethod[src]
pub fn auth_method(&self) -> &AuthMethodGet a reference to the authentication method in use.
pub fn auth_method_mut(&mut self) -> &mut AuthMethod[src]
pub fn auth_method_mut(&mut self) -> &mut AuthMethodGet a mutable reference to the authentication method in use.
pub fn get_service_info<Srv>(&self) -> Result<ServiceInfo> where
Srv: ServiceType, [src]
pub fn get_service_info<Srv>(&self) -> Result<ServiceInfo> where
Srv: ServiceType, Get service info for the given service.
pub fn get_endpoint<Srv: ServiceType>(&self, path: &[&str]) -> Result<Url>[src]
pub fn get_endpoint<Srv: ServiceType>(&self, path: &[&str]) -> Result<Url>Construct and endpoint for the given service from the path.
pub fn request<Srv: ServiceType>(
&self,
method: Method,
path: &[&str],
api_version: Option<ApiVersion>
) -> Result<RequestBuilder>[src]
pub fn request<Srv: ServiceType>(
&self,
method: Method,
path: &[&str],
api_version: Option<ApiVersion>
) -> Result<RequestBuilder>Make an HTTP request to the given service.
Trait Implementations
impl From<Session> for Cloud[src]
impl From<Session> for Cloudimpl Debug for Session[src]
impl Debug for Sessionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Session[src]
impl Clone for Session