Struct cedar_policy_core::ast::RestrictedExprShapeOnly
source · pub struct RestrictedExprShapeOnly<'a>(/* private fields */);
Expand description
Like ExprShapeOnly
, but for restricted expressions.
A newtype wrapper around (borrowed) restricted expressions that provides
Eq
and Hash
implementations that ignore any source information or other
generic data used to annotate the expression.
Implementations§
source§impl<'a> RestrictedExprShapeOnly<'a>
impl<'a> RestrictedExprShapeOnly<'a>
sourcepub fn new(e: BorrowedRestrictedExpr<'a>) -> RestrictedExprShapeOnly<'a>
pub fn new(e: BorrowedRestrictedExpr<'a>) -> RestrictedExprShapeOnly<'a>
Construct a RestrictedExprShapeOnly
from a BorrowedRestrictedExpr
.
The BorrowedRestrictedExpr
is not modified, but any comparisons on the
resulting RestrictedExprShapeOnly
will ignore source information and
generic data.
Trait Implementations§
source§impl<'a> Clone for RestrictedExprShapeOnly<'a>
impl<'a> Clone for RestrictedExprShapeOnly<'a>
source§fn clone(&self) -> RestrictedExprShapeOnly<'a>
fn clone(&self) -> RestrictedExprShapeOnly<'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 moresource§impl<'a> Debug for RestrictedExprShapeOnly<'a>
impl<'a> Debug for RestrictedExprShapeOnly<'a>
source§impl<'a> Hash for RestrictedExprShapeOnly<'a>
impl<'a> Hash for RestrictedExprShapeOnly<'a>
source§impl<'a> PartialEq for RestrictedExprShapeOnly<'a>
impl<'a> PartialEq for RestrictedExprShapeOnly<'a>
impl<'a> Eq for RestrictedExprShapeOnly<'a>
Auto Trait Implementations§
impl<'a> Freeze for RestrictedExprShapeOnly<'a>
impl<'a> RefUnwindSafe for RestrictedExprShapeOnly<'a>
impl<'a> Send for RestrictedExprShapeOnly<'a>
impl<'a> Sync for RestrictedExprShapeOnly<'a>
impl<'a> Unpin for RestrictedExprShapeOnly<'a>
impl<'a> UnwindSafe for RestrictedExprShapeOnly<'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