pub struct UniClient { /* private fields */ }Expand description
Asynchronous client for the Unimatrix HTTP API.
Implementations§
Source§impl UniClient
impl UniClient
Sourcepub fn new(
access_key_id: impl Into<String>,
access_key_secret: impl Into<String>,
) -> Result<Self>
pub fn new( access_key_id: impl Into<String>, access_key_secret: impl Into<String>, ) -> Result<Self>
Creates a client with explicit credentials.
Sourcepub fn builder() -> UniClientBuilder
pub fn builder() -> UniClientBuilder
Creates a builder pre-populated from UNIMTX_* environment variables.
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Creates a client using credentials and endpoint from the environment.
Sourcepub fn messages(&self) -> MessageService<'_>
pub fn messages(&self) -> MessageService<'_>
Returns the SMS message service.
Sourcepub fn otp(&self) -> OtpService<'_>
pub fn otp(&self) -> OtpService<'_>
Returns the one-time passcode service.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for UniClient
impl !UnwindSafe for UniClient
impl Freeze for UniClient
impl Send for UniClient
impl Sync for UniClient
impl Unpin for UniClient
impl UnsafeUnpin for UniClient
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