pub struct Statement {
id: String,
reason: String,
source: String,
actions: BTreeSet<ActionName>,
principal: PrincipalNeed,
collections: BTreeSet<String>,
pools: BTreeSet<String>,
reads_record: bool,
reads_client: bool,
policy: Policy,
}Expand description
One loaded forbid.
Fields§
§id: String§reason: String§source: String§actions: BTreeSet<ActionName>§principal: PrincipalNeed§collections: BTreeSet<String>§pools: BTreeSet<String>§reads_record: bool§reads_client: bool§policy: PolicyImplementations§
Source§impl Statement
impl Statement
Sourcepub fn source(&self) -> &str
pub fn source(&self) -> &str
The statement’s own text, annotations included, loadable on its own.
Sourcepub fn actions(&self) -> &BTreeSet<ActionName>
pub fn actions(&self) -> &BTreeSet<ActionName>
The actions the statement’s scope admits. A statement with an
unconstrained action admits every one.
Sourcepub fn principal(&self) -> PrincipalNeed
pub fn principal(&self) -> PrincipalNeed
What the statement’s scope needs to know about the account.
Sourcepub fn collections(&self) -> &BTreeSet<String>
pub fn collections(&self) -> &BTreeSet<String>
The collections the statement compares resource.collection to.
Empty when it names none, which is not the same as applying to
none: applicability is the gate’s business, this is only what the
loader can see.
Sourcepub fn pools(&self) -> &BTreeSet<String>
pub fn pools(&self) -> &BTreeSet<String>
The pools the statement compares resource.pool to, by ==, !=
or [..].contains.
Sourcepub fn reads_record(&self) -> bool
pub fn reads_record(&self) -> bool
Whether the statement reads context.value or context.existing,
the two things only a collection’s shape can type.
Sourcepub fn reads_client(&self) -> bool
pub fn reads_client(&self) -> bool
Whether the statement reads or tests context.client, the client
a record.write was made through.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnsafeUnpin for Statement
impl UnwindSafe for Statement
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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