pub struct ApplySpec<N> {
pub resource_types: Vec<N>,
pub principal_types: Vec<N>,
pub context: AttributesOrContext<N>,
}
Expand description
The apply spec specifies what principals and resources an action can be used with. This specification can either be done through containing to entity types. An empty list is interpreted as specifying that there are no principals or resources that an action applies to.
The parameter N
is the type of entity type names and common type names in
this ApplySpec
, including recursively.
See notes on Fragment
.
Fields§
§resource_types: Vec<N>
Resource types that are valid for the action
principal_types: Vec<N>
Principal types that are valid for the action
context: AttributesOrContext<N>
Context type that this action expects
Implementations§
Source§impl ApplySpec<RawName>
impl ApplySpec<RawName>
Sourcepub fn conditionally_qualify_type_references(
self,
ns: Option<&InternalName>,
) -> ApplySpec<ConditionalName>
pub fn conditionally_qualify_type_references( self, ns: Option<&InternalName>, ) -> ApplySpec<ConditionalName>
(Conditionally) prefix unqualified entity and common type references with the namespace they are in
Source§impl ApplySpec<ConditionalName>
impl ApplySpec<ConditionalName>
Sourcepub fn fully_qualify_type_references(
self,
all_defs: &AllDefs,
) -> Result<ApplySpec<InternalName>, TypeNotDefinedError>
pub fn fully_qualify_type_references( self, all_defs: &AllDefs, ) -> Result<ApplySpec<InternalName>, TypeNotDefinedError>
Convert this ApplySpec<ConditionalName>
into an
ApplySpec<InternalName>
by fully-qualifying all typenames that
appear anywhere in any definitions.
all_defs
needs to contain the full set of all fully-qualified typenames
and actions that are defined in the schema (in all schema fragments).
Trait Implementations§
Source§impl<'de, N> Deserialize<'de> for ApplySpec<N>
impl<'de, N> Deserialize<'de> for ApplySpec<N>
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>,
impl<N> StructuralPartialEq for ApplySpec<N>
Auto Trait Implementations§
impl<N> Freeze for ApplySpec<N>where
N: Freeze,
impl<N> RefUnwindSafe for ApplySpec<N>where
N: RefUnwindSafe,
impl<N> Send for ApplySpec<N>where
N: Send,
impl<N> Sync for ApplySpec<N>where
N: Sync,
impl<N> Unpin for ApplySpec<N>where
N: Unpin,
impl<N> UnwindSafe for ApplySpec<N>where
N: UnwindSafe + RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
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>
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