pub struct Caller<'a> {
pub role: Option<&'a str>,
pub session: &'a HashMap<String, String>,
}Expand description
Who is asking, for the places that have to narrow rows to them.
The two request-scoped facts a permission needs, carried together because
they are always needed together and because the SQL builders they reach are
several calls below the context that holds them. role: None is the
unrestricted read: no permission document, or an administrator.
Fields§
§role: Option<&'a str>The role to narrow rows to. None is the unrestricted read.
session: &'a HashMap<String, String>Session variables the permissions may refer to, such as
x-hasura-user-id.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Caller<'a>
impl<'a> RefUnwindSafe for Caller<'a>
impl<'a> Send for Caller<'a>
impl<'a> Sync for Caller<'a>
impl<'a> Unpin for Caller<'a>
impl<'a> UnsafeUnpin for Caller<'a>
impl<'a> UnwindSafe for Caller<'a>
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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more