pub struct SubjectRef {
pub object: ObjectRef,
pub relation: Option<String>,
}Expand description
The subject half of a tuple: either a concrete object, or the userset
object#relation — “everyone who holds relation on object”.
The userset form is what makes group nesting explicit
(group:eng#member writer database:music); the plain form is expanded
through crate::AuthzConfig::expand_relations so the shorter, more
common spelling (group:eng writer database:music) also works.
Fields§
§object: ObjectRefThe object named on the subject side.
relation: Option<String>Relation on that object, when the subject is a userset.
Implementations§
Trait Implementations§
Source§impl Clone for SubjectRef
impl Clone for SubjectRef
Source§fn clone(&self) -> SubjectRef
fn clone(&self) -> SubjectRef
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 SubjectRef
impl Debug for SubjectRef
Source§impl Display for SubjectRef
impl Display for SubjectRef
impl Eq for SubjectRef
Source§impl Hash for SubjectRef
impl Hash for SubjectRef
Source§impl Ord for SubjectRef
impl Ord for SubjectRef
Source§fn cmp(&self, other: &SubjectRef) -> Ordering
fn cmp(&self, other: &SubjectRef) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SubjectRef
impl PartialEq for SubjectRef
Source§impl PartialOrd for SubjectRef
impl PartialOrd for SubjectRef
impl StructuralPartialEq for SubjectRef
Auto Trait Implementations§
impl Freeze for SubjectRef
impl RefUnwindSafe for SubjectRef
impl Send for SubjectRef
impl Sync for SubjectRef
impl Unpin for SubjectRef
impl UnsafeUnpin for SubjectRef
impl UnwindSafe for SubjectRef
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.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