pub struct Identity { /* private fields */ }Implementations§
Source§impl Identity
impl Identity
Sourcepub fn new(config: AuthConfig, service_endpoint: Option<String>) -> Identity
pub fn new(config: AuthConfig, service_endpoint: Option<String>) -> Identity
Creates a new Identity which is the client necessary to interact with this type of object on OCI.
§Example 1
use oci_sdk::{
config::AuthConfig,
identity::{Identity},
};
let auth_config = AuthConfig::from_file(None, None);
let identity = Identity::new(auth_config, None);§Example 2
use oci_sdk::{
config::AuthConfig,
identity::{Identity},
};
let auth_config = AuthConfig::from_file(Some("tests/assets/oci_config".to_string()), Some("DEFAULT".to_string()));
let identity = Identity::new(auth_config, None);Returns the Nosql client.
pub async fn get_current_user( &self, ) -> Result<Response, Box<dyn Error + Send + Sync>>
pub async fn get_user( &self, user_ocid: String, ) -> Result<Response, Box<dyn Error + Send + Sync>>
pub async fn list_users( &self, compartment_id: String, ) -> Result<Response, Box<dyn Error + Send + Sync>>
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnsafeUnpin for Identity
impl UnwindSafe for Identity
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