pub struct ClientConfig {
pub name: String,
pub token: Option<Token>,
pub applications: Vec<String>,
}Expand description
One caller, and what it may read.
Fields§
§name: StringThe client’s name. Appears in the audit log and nowhere else.
token: Option<Token>The bearer token this client presents.
Absent means anonymous: this client is whoever calls without a
credential. That needs allow_anonymous
as well, so an omitted token can never be the accident that opens a
server up.
applications: Vec<String>The applications this client may read, by name. Exact, no wildcards.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn is_anonymous(&self) -> bool
pub fn is_anonymous(&self) -> bool
Whether this client is the anonymous one.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 ClientConfig
impl Debug for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfig
impl<'de> Deserialize<'de> for ClientConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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