pub struct Assertion {
pub email: String,
pub name: String,
pub via: String,
pub token_name: Option<String>,
pub token_org: Option<OrgId>,
pub scopes: Vec<String>,
pub orgs: Vec<(OrgId, Role)>,
pub platform_admin: bool,
}Expand description
A caller, as the control plane vouches for it.
Fields§
§email: String§name: String§via: Stringsession, token, access, local (the control plane’s socket)
or control-plane (the control plane itself: heartbeats, events).
token_name: Option<String>§token_org: Option<OrgId>§scopes: Vec<String>§orgs: Vec<(OrgId, Role)>§platform_admin: boolImplementations§
Source§impl Assertion
impl Assertion
Sourcepub fn control_plane() -> Self
pub fn control_plane() -> Self
The control plane acting for itself.
Sourcepub fn for_caller(c: &Caller) -> Option<Self>
pub fn for_caller(c: &Caller) -> Option<Self>
What to assert for a caller the control plane admitted. None for
callers that never reach a forward (Access identities without an
account; the authorizer refuses them first).
Sourcepub fn from_header(v: &str) -> Result<Self>
pub fn from_header(v: &str) -> Result<Self>
Parse an Authorization header value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Assertion
impl<'de> Deserialize<'de> for Assertion
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
impl Eq for Assertion
impl StructuralPartialEq for Assertion
Auto Trait Implementations§
impl Freeze for Assertion
impl RefUnwindSafe for Assertion
impl Send for Assertion
impl Sync for Assertion
impl Unpin for Assertion
impl UnsafeUnpin for Assertion
impl UnwindSafe for Assertion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.