pub struct ConstantRef(/* private fields */);Expand description
A ConstantRef is a reference to a Constant.
Most importantly, it implements AsRef<Constant> and Deref<Target = Constant>.
It also has a cheap Clone – only the reference is cloned, not the
underlying Constant.
Implementations§
Trait Implementations§
Source§impl AsRef<Constant> for ConstantRef
impl AsRef<Constant> for ConstantRef
Source§impl Clone for ConstantRef
impl Clone for ConstantRef
Source§fn clone(&self) -> ConstantRef
fn clone(&self) -> ConstantRef
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 Debug for ConstantRef
impl Debug for ConstantRef
Source§impl Deref for ConstantRef
impl Deref for ConstantRef
Source§impl Display for ConstantRef
impl Display for ConstantRef
Source§impl PartialEq for ConstantRef
impl PartialEq for ConstantRef
impl StructuralPartialEq for ConstantRef
Auto Trait Implementations§
impl Freeze for ConstantRef
impl RefUnwindSafe for ConstantRef
impl Send for ConstantRef
impl Sync for ConstantRef
impl Unpin for ConstantRef
impl UnwindSafe for ConstantRef
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§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