pub struct NamedExpression { /* private fields */ }Implementations§
Source§impl NamedExpression
impl NamedExpression
pub fn new<S: Into<String>, B: Into<ExpressionBody>>( name: S, variables: Vec<String>, body: B, ) -> Self
pub fn from_body_with_name(name: String, body: BoundExpressionBody) -> Self
pub fn name(&self) -> &str
pub fn set_name(&mut self, new_name: impl Into<String>)
pub fn set_variables(&mut self, new_variables: Vec<String>)
pub fn destruct(self) -> (String, Vec<String>, Vec<ComplexExpression>)
pub fn apply_element_permutation(&mut self, elem_perm: &[usize])
Trait Implementations§
Source§impl AsRef<[ComplexExpression]> for NamedExpression
impl AsRef<[ComplexExpression]> for NamedExpression
Source§fn as_ref(&self) -> &[ComplexExpression]
fn as_ref(&self) -> &[ComplexExpression]
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for BraExpression
impl AsRef<NamedExpression> for BraExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for BraSystemExpression
impl AsRef<NamedExpression> for BraSystemExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for IsometryExpression
impl AsRef<NamedExpression> for IsometryExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for KetExpression
impl AsRef<NamedExpression> for KetExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for KetSystemExpression
impl AsRef<NamedExpression> for KetSystemExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for KrausOperatorsExpression
impl AsRef<NamedExpression> for KrausOperatorsExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for TensorExpression
impl AsRef<NamedExpression> for TensorExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for UnitaryExpression
impl AsRef<NamedExpression> for UnitaryExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<NamedExpression> for UnitarySystemExpression
impl AsRef<NamedExpression> for UnitarySystemExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for NamedExpression
impl Clone for NamedExpression
Source§fn clone(&self) -> NamedExpression
fn clone(&self) -> NamedExpression
Returns a duplicate 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 NamedExpression
impl Debug for NamedExpression
Source§impl Deref for NamedExpression
impl Deref for NamedExpression
Source§impl DerefMut for NamedExpression
impl DerefMut for NamedExpression
Source§impl From<BraExpression> for NamedExpression
impl From<BraExpression> for NamedExpression
Source§fn from(value: BraExpression) -> Self
fn from(value: BraExpression) -> Self
Converts to this type from the input type.
Source§impl From<BraSystemExpression> for NamedExpression
impl From<BraSystemExpression> for NamedExpression
Source§fn from(value: BraSystemExpression) -> Self
fn from(value: BraSystemExpression) -> Self
Converts to this type from the input type.
Source§impl From<IsometryExpression> for NamedExpression
impl From<IsometryExpression> for NamedExpression
Source§fn from(value: IsometryExpression) -> Self
fn from(value: IsometryExpression) -> Self
Converts to this type from the input type.
Source§impl From<KetExpression> for NamedExpression
impl From<KetExpression> for NamedExpression
Source§fn from(value: KetExpression) -> Self
fn from(value: KetExpression) -> Self
Converts to this type from the input type.
Source§impl From<KetSystemExpression> for NamedExpression
impl From<KetSystemExpression> for NamedExpression
Source§fn from(value: KetSystemExpression) -> Self
fn from(value: KetSystemExpression) -> Self
Converts to this type from the input type.
Source§impl From<KrausOperatorsExpression> for NamedExpression
impl From<KrausOperatorsExpression> for NamedExpression
Source§fn from(value: KrausOperatorsExpression) -> Self
fn from(value: KrausOperatorsExpression) -> Self
Converts to this type from the input type.
Source§impl From<TensorExpression> for NamedExpression
impl From<TensorExpression> for NamedExpression
Source§fn from(value: TensorExpression) -> Self
fn from(value: TensorExpression) -> Self
Converts to this type from the input type.
Source§impl From<UnitaryExpression> for NamedExpression
impl From<UnitaryExpression> for NamedExpression
Source§fn from(value: UnitaryExpression) -> Self
fn from(value: UnitaryExpression) -> Self
Converts to this type from the input type.
Source§impl From<UnitarySystemExpression> for NamedExpression
impl From<UnitarySystemExpression> for NamedExpression
Source§fn from(value: UnitarySystemExpression) -> Self
fn from(value: UnitarySystemExpression) -> Self
Converts to this type from the input type.
Source§impl<B: AsRef<[ComplexExpression]>> PartialEq<B> for NamedExpression
impl<B: AsRef<[ComplexExpression]>> PartialEq<B> for NamedExpression
impl Eq for NamedExpression
Auto Trait Implementations§
impl Freeze for NamedExpression
impl RefUnwindSafe for NamedExpression
impl Send for NamedExpression
impl Sync for NamedExpression
impl Unpin for NamedExpression
impl UnwindSafe for NamedExpression
Blanket Implementations§
Source§impl<'short, T, Target> AsGeneralizedRef<'short, &'short Target> for T
impl<'short, T, Target> AsGeneralizedRef<'short, &'short Target> for T
fn as_generalized_ref(&'short self) -> &'short Target
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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