Struct openstack_sdk::OpenStack
source · pub struct OpenStack { /* private fields */ }Expand description
A representation of the OpenStack API for a single user.
Separate users should use separate instances of this.
Implementations§
source§impl OpenStack
impl OpenStack
sourcepub fn new(config: &CloudConfig) -> Result<Self, OpenStackError>
pub fn new(config: &CloudConfig) -> Result<Self, OpenStackError>
Create a new OpenStack API session from CloudConfig
Authorize against the cloud using provided credentials and get the session token
pub fn discover_service_endpoint( &mut self, service_type: &ServiceType ) -> Result<(), OpenStackError>
sourcepub fn rest_with_auth(
&self,
request: Builder,
body: Vec<u8>,
auth: &Auth
) -> Result<HttpResponse<Bytes>, ApiError<<Self as RestClient>::Error>>
pub fn rest_with_auth( &self, request: Builder, body: Vec<u8>, auth: &Auth ) -> Result<HttpResponse<Bytes>, ApiError<<Self as RestClient>::Error>>
Perform a REST query with a given auth.
Trait Implementations§
source§impl RestClient for OpenStack
impl RestClient for OpenStack
source§fn rest_endpoint(
&self,
service_type: &ServiceType,
endpoint: &str
) -> Result<Url, ApiError<Self::Error>>
fn rest_endpoint( &self, service_type: &ServiceType, endpoint: &str ) -> Result<Url, ApiError<Self::Error>>
Construct final URL for the resource given the service type and RestEndpoint
source§fn get_service_endpoint(
&self,
service_type: &ServiceType
) -> Result<ServiceEndpoint, ApiError<Self::Error>>
fn get_service_endpoint( &self, service_type: &ServiceType ) -> Result<ServiceEndpoint, ApiError<Self::Error>>
Get service endpoint from the catalog
source§fn get_current_project(&self) -> Option<Project>
fn get_current_project(&self) -> Option<Project>
Get current token project information
Auto Trait Implementations§
impl !RefUnwindSafe for OpenStack
impl Send for OpenStack
impl Sync for OpenStack
impl Unpin for OpenStack
impl !UnwindSafe for OpenStack
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more