Struct cedar_policy::extensions::Extensions
source · pub struct Extensions<'a> { /* private fields */ }
Expand description
Holds data on all the Extensions which are active for a given evaluation.
Clone is cheap for this type.
Implementations§
source§impl Extensions<'static>
impl Extensions<'static>
sourcepub fn all_available() -> Extensions<'static>
pub fn all_available() -> Extensions<'static>
Get a new Extensions
containing data on all the available extensions.
sourcepub fn none() -> Extensions<'static>
pub fn none() -> Extensions<'static>
Get a new Extensions
with no extensions enabled.
source§impl<'a> Extensions<'a>
impl<'a> Extensions<'a>
sourcepub fn specific_extensions(extensions: &'a [Extension]) -> Extensions<'a>
pub fn specific_extensions(extensions: &'a [Extension]) -> Extensions<'a>
Get a new Extensions
with these specific extensions enabled.
sourcepub fn func(&self, name: &Name) -> Result<&ExtensionFunction, ExtensionsError>
pub fn func(&self, name: &Name) -> Result<&ExtensionFunction, ExtensionsError>
Get the extension function with the given name, from these extensions.
Returns an error if the function is not defined by any extension, or if it is defined multiple times.
Trait Implementations§
source§impl<'a> Clone for Extensions<'a>
impl<'a> Clone for Extensions<'a>
source§fn clone(&self) -> Extensions<'a>
fn clone(&self) -> Extensions<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for Extensions<'a>
impl<'a> !RefUnwindSafe for Extensions<'a>
impl<'a> Send for Extensions<'a>
impl<'a> Sync for Extensions<'a>
impl<'a> Unpin for Extensions<'a>
impl<'a> !UnwindSafe for Extensions<'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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
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>
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