pub struct GraphMailClientBuilder { /* private fields */ }Expand description
Builder for GraphMailClient.
Required: tenant_id, client_id,
client_secret. Optional overrides for sovereign clouds:
token_url, graph_base, scope.
Implementations§
Source§impl GraphMailClientBuilder
impl GraphMailClientBuilder
Sourcepub fn client_id(self, id: impl Into<String>) -> Self
pub fn client_id(self, id: impl Into<String>) -> Self
Application (client) ID from app registration.
Sourcepub fn client_secret(self, secret: impl Into<String>) -> Self
pub fn client_secret(self, secret: impl Into<String>) -> Self
Client secret from app registration.
Sourcepub fn token_url(self, url: impl Into<String>) -> Self
pub fn token_url(self, url: impl Into<String>) -> Self
Override token endpoint (e.g. for sovereign clouds). Default: https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
Sourcepub fn graph_base(self, base: impl Into<String>) -> Self
pub fn graph_base(self, base: impl Into<String>) -> Self
Override Graph API base URL (e.g. for sovereign clouds). Default: https://graph.microsoft.com/v1.0
Sourcepub fn scope(self, scope: impl Into<String>) -> Self
pub fn scope(self, scope: impl Into<String>) -> Self
Override scope. Default: https://graph.microsoft.com/.default
Sourcepub fn build(self) -> Result<GraphMailClient>
pub fn build(self) -> Result<GraphMailClient>
Build the GraphMailClient. Fails if tenant_id, client_id, or client_secret are missing.
Trait Implementations§
Source§impl Clone for GraphMailClientBuilder
impl Clone for GraphMailClientBuilder
Source§fn clone(&self) -> GraphMailClientBuilder
fn clone(&self) -> GraphMailClientBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphMailClientBuilder
impl Debug for GraphMailClientBuilder
Source§impl Default for GraphMailClientBuilder
impl Default for GraphMailClientBuilder
Source§fn default() -> GraphMailClientBuilder
fn default() -> GraphMailClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GraphMailClientBuilder
impl RefUnwindSafe for GraphMailClientBuilder
impl Send for GraphMailClientBuilder
impl Sync for GraphMailClientBuilder
impl Unpin for GraphMailClientBuilder
impl UnsafeUnpin for GraphMailClientBuilder
impl UnwindSafe for GraphMailClientBuilder
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