pub struct CreateApiKeyOptions { /* private fields */ }Expand description
Name and permissions of the new ApiKey.
Implementations§
Source§impl CreateApiKeyOptions
impl CreateApiKeyOptions
Sourcepub fn new(name: &str) -> Self
pub fn new(name: &str) -> Self
Creates a new CreateApiKeyOptions.
Sourcepub const fn with_full_access(self) -> Self
pub const fn with_full_access(self) -> Self
The API key can have full access to Resend’s API or be only restricted to send emails.
full_access- Can create, delete, get, and update any resource.sending_access- Can only send emails.
Sourcepub const fn with_sending_access(self) -> Self
pub const fn with_sending_access(self) -> Self
Restricts an API key to only sending emails
Sourcepub fn with_domain_access(self, domain_id: &DomainId) -> Self
pub fn with_domain_access(self, domain_id: &DomainId) -> Self
Restricts an API key to send emails only from a specific domain.
Trait Implementations§
Source§impl Clone for CreateApiKeyOptions
impl Clone for CreateApiKeyOptions
Source§fn clone(&self) -> CreateApiKeyOptions
fn clone(&self) -> CreateApiKeyOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateApiKeyOptions
impl Debug for CreateApiKeyOptions
Auto Trait Implementations§
impl Freeze for CreateApiKeyOptions
impl RefUnwindSafe for CreateApiKeyOptions
impl Send for CreateApiKeyOptions
impl Sync for CreateApiKeyOptions
impl Unpin for CreateApiKeyOptions
impl UnsafeUnpin for CreateApiKeyOptions
impl UnwindSafe for CreateApiKeyOptions
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