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