pub struct DevModeCredentials {
pub subject: String,
pub email: Option<String>,
pub display_name: Option<String>,
pub grants: Option<String>,
}Expand description
DevMode credentials for local development and testing.
Fields§
§subject: StringUnique identifier for the user (required).
email: Option<String>Email address (optional).
display_name: Option<String>Display name (optional).
grants: Option<String>Authorization grants as JSON string (optional).
Format: {"global": [...], "databases": {...}, "all_databases": [...]}
Implementations§
Source§impl DevModeCredentials
impl DevModeCredentials
Sourcepub fn new(subject: impl Into<String>) -> Self
pub fn new(subject: impl Into<String>) -> Self
Create new DevMode credentials with the given subject.
Sourcepub fn with_email(self, email: impl Into<String>) -> Self
pub fn with_email(self, email: impl Into<String>) -> Self
Set the email address.
Sourcepub fn with_display_name(self, display_name: impl Into<String>) -> Self
pub fn with_display_name(self, display_name: impl Into<String>) -> Self
Set the display name.
Sourcepub fn with_grants(self, grants: impl Into<String>) -> Self
pub fn with_grants(self, grants: impl Into<String>) -> Self
Set the grants as a JSON string.
Format: {"global": [...], "databases": {...}, "all_databases": [...]}
Trait Implementations§
Source§impl Clone for DevModeCredentials
impl Clone for DevModeCredentials
Source§fn clone(&self) -> DevModeCredentials
fn clone(&self) -> DevModeCredentials
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 DevModeCredentials
impl Debug for DevModeCredentials
Source§impl Default for DevModeCredentials
impl Default for DevModeCredentials
Source§fn default() -> DevModeCredentials
fn default() -> DevModeCredentials
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DevModeCredentials
impl RefUnwindSafe for DevModeCredentials
impl Send for DevModeCredentials
impl Sync for DevModeCredentials
impl Unpin for DevModeCredentials
impl UnwindSafe for DevModeCredentials
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request