pub struct Parameter<const N: usize> { /* private fields */ }Expand description
A struct representing a set of mutable parameters for a parametrised gate. Cloning this struct is cheap and allows multiple gates to share the same underlying parameters.
§Fields
values: AnArc<Mutex<[f64; N]>>that holds the parameter values.
§Generic Parameters
N: The number of values in the parameter array.
Implementations§
Source§impl<const N: usize> Parameter<N>
impl<const N: usize> Parameter<N>
Sourcepub fn deep_clone(&self) -> Self
pub fn deep_clone(&self) -> Self
Creates a new Parameter instance as an independent copy of the given parameter.
§Returns
A new Parameter instance.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for Parameter<N>
impl<const N: usize> RefUnwindSafe for Parameter<N>
impl<const N: usize> Send for Parameter<N>
impl<const N: usize> Sync for Parameter<N>
impl<const N: usize> Unpin for Parameter<N>
impl<const N: usize> UnwindSafe for Parameter<N>
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