Ref

Struct Ref 

Source
pub struct Ref<T>(pub Rc<RefCell<T>>);

Tuple Fields§

§0: Rc<RefCell<T>>

Implementations§

Source§

impl<T> Ref<T>

Source

pub fn new(item: T) -> Ref<T>

Source

pub fn as_ptr(&self) -> *const T

Source

pub fn as_mut_ptr(&self) -> *mut T

Source

pub fn borrow(&self) -> Ref<'_, T>

Source

pub fn borrow_mut(&self) -> RefMut<'_, T>

Source

pub fn addr(&self) -> usize

Source

pub fn id(&self) -> u64

Trait Implementations§

Source§

impl<T> Clone for Ref<T>

Source§

fn clone(&self) -> Ref<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> CompileConst for Ref<Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>>

Available on crate feature row_vectord only.
Source§

impl<T> CompileConst for Ref<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>>

Available on crate feature vectord only.
Source§

impl<T> CompileConst for Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>

Available on crate feature matrixd only.
Source§

impl<T> CopyMat<T> for Ref<Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>>

Source§

fn copy_into( &self, dst: &Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>, offset: usize, ) -> usize

Source§

fn copy_into_v( &self, dst: &Ref<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>>, offset: usize, ) -> usize

Source§

fn copy_into_r( &self, dst: &Ref<Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>>, offset: usize, ) -> usize

Source§

fn copy_into_row_major( &self, dst: &Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>, offset: usize, ) -> usize

Source§

fn addr(&self) -> usize

Source§

fn compile_const_mat(&self, ctx: &mut CompileCtx) -> Result<u32, MechError2>

Source§

impl<T> CopyMat<T> for Ref<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>>

Source§

fn copy_into( &self, dst: &Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>, offset: usize, ) -> usize

Source§

fn copy_into_v( &self, dst: &Ref<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>>, offset: usize, ) -> usize

Source§

fn copy_into_r( &self, dst: &Ref<Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>>, offset: usize, ) -> usize

Source§

fn copy_into_row_major( &self, dst: &Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>, offset: usize, ) -> usize

Source§

fn addr(&self) -> usize

Source§

fn compile_const_mat(&self, ctx: &mut CompileCtx) -> Result<u32, MechError2>

Source§

impl<T> CopyMat<T> for Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>

Source§

fn copy_into( &self, dst: &Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>, offset: usize, ) -> usize

Source§

fn copy_into_v( &self, dst: &Ref<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>>, offset: usize, ) -> usize

Source§

fn copy_into_r( &self, dst: &Ref<Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>>, offset: usize, ) -> usize

Source§

fn copy_into_row_major( &self, dst: &Ref<Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>>, offset: usize, ) -> usize

Source§

fn addr(&self) -> usize

Source§

fn compile_const_mat(&self, ctx: &mut CompileCtx) -> Result<u32, MechError2>

Source§

impl<T> Debug for Ref<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> PartialEq for Ref<T>
where T: PartialEq,

Source§

fn eq(&self, other: &Ref<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToIndex for Ref<Vec<i64>>

Available on crate feature matrix only.
Source§

fn to_index(&self) -> Value

Source§

impl ToValue for Ref<C64>

Available on crate feature complex only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<C64, Const<1>, Dyn, VecStorage<C64, Const<1>, Dyn>>>

Available on crate features matrix and complex only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<C64, Dyn, Const<1>, VecStorage<C64, Dyn, Const<1>>>>

Available on crate features matrix and complex only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<C64, Dyn, Dyn, VecStorage<C64, Dyn, Dyn>>>

Available on crate features matrix and complex only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<R64, Const<1>, Dyn, VecStorage<R64, Const<1>, Dyn>>>

Available on crate features matrix and rational only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<R64, Dyn, Const<1>, VecStorage<R64, Dyn, Const<1>>>>

Available on crate features matrix and rational only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<R64, Dyn, Dyn, VecStorage<R64, Dyn, Dyn>>>

Available on crate features matrix and rational only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<String, Const<1>, Dyn, VecStorage<String, Const<1>, Dyn>>>

Available on crate features matrix and string only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<String, Dyn, Const<1>, VecStorage<String, Dyn, Const<1>>>>

Available on crate features matrix and string only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<String, Dyn, Dyn, VecStorage<String, Dyn, Dyn>>>

Available on crate features matrix and string only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<bool, Const<1>, Dyn, VecStorage<bool, Const<1>, Dyn>>>

Available on crate features matrix and bool only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<bool, Dyn, Const<1>, VecStorage<bool, Dyn, Const<1>>>>

Available on crate features matrix and bool only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<bool, Dyn, Dyn, VecStorage<bool, Dyn, Dyn>>>

Available on crate features matrix and bool only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<f32, Const<1>, Dyn, VecStorage<f32, Const<1>, Dyn>>>

Available on crate features matrix and f32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<f32, Dyn, Const<1>, VecStorage<f32, Dyn, Const<1>>>>

Available on crate features matrix and f32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<f32, Dyn, Dyn, VecStorage<f32, Dyn, Dyn>>>

Available on crate features matrix and f32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<f64, Const<1>, Dyn, VecStorage<f64, Const<1>, Dyn>>>

Available on crate features matrix and f64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>>

Available on crate features matrix and f64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>>

Available on crate features matrix and f64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i128, Const<1>, Dyn, VecStorage<i128, Const<1>, Dyn>>>

Available on crate features matrix and i128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i128, Dyn, Const<1>, VecStorage<i128, Dyn, Const<1>>>>

Available on crate features matrix and i128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i128, Dyn, Dyn, VecStorage<i128, Dyn, Dyn>>>

Available on crate features matrix and i128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i16, Const<1>, Dyn, VecStorage<i16, Const<1>, Dyn>>>

Available on crate features matrix and i16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i16, Dyn, Const<1>, VecStorage<i16, Dyn, Const<1>>>>

Available on crate features matrix and i16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i16, Dyn, Dyn, VecStorage<i16, Dyn, Dyn>>>

Available on crate features matrix and i16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i32, Const<1>, Dyn, VecStorage<i32, Const<1>, Dyn>>>

Available on crate features matrix and i32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i32, Dyn, Const<1>, VecStorage<i32, Dyn, Const<1>>>>

Available on crate features matrix and i32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i32, Dyn, Dyn, VecStorage<i32, Dyn, Dyn>>>

Available on crate features matrix and i32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i64, Const<1>, Dyn, VecStorage<i64, Const<1>, Dyn>>>

Available on crate features matrix and i64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i64, Dyn, Const<1>, VecStorage<i64, Dyn, Const<1>>>>

Available on crate features matrix and i64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i64, Dyn, Dyn, VecStorage<i64, Dyn, Dyn>>>

Available on crate features matrix and i64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i8, Const<1>, Dyn, VecStorage<i8, Const<1>, Dyn>>>

Available on crate features matrix and i8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i8, Dyn, Const<1>, VecStorage<i8, Dyn, Const<1>>>>

Available on crate features matrix and i8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<i8, Dyn, Dyn, VecStorage<i8, Dyn, Dyn>>>

Available on crate features matrix and i8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u128, Const<1>, Dyn, VecStorage<u128, Const<1>, Dyn>>>

Available on crate features matrix and u128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u128, Dyn, Const<1>, VecStorage<u128, Dyn, Const<1>>>>

Available on crate features matrix and u128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u128, Dyn, Dyn, VecStorage<u128, Dyn, Dyn>>>

Available on crate features matrix and u128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u16, Const<1>, Dyn, VecStorage<u16, Const<1>, Dyn>>>

Available on crate features matrix and u16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u16, Dyn, Const<1>, VecStorage<u16, Dyn, Const<1>>>>

Available on crate features matrix and u16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u16, Dyn, Dyn, VecStorage<u16, Dyn, Dyn>>>

Available on crate features matrix and u16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u32, Const<1>, Dyn, VecStorage<u32, Const<1>, Dyn>>>

Available on crate features matrix and u32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u32, Dyn, Const<1>, VecStorage<u32, Dyn, Const<1>>>>

Available on crate features matrix and u32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u32, Dyn, Dyn, VecStorage<u32, Dyn, Dyn>>>

Available on crate features matrix and u32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u64, Const<1>, Dyn, VecStorage<u64, Const<1>, Dyn>>>

Available on crate features matrix and u64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u64, Dyn, Const<1>, VecStorage<u64, Dyn, Const<1>>>>

Available on crate features matrix and u64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u64, Dyn, Dyn, VecStorage<u64, Dyn, Dyn>>>

Available on crate features matrix and u64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u8, Const<1>, Dyn, VecStorage<u8, Const<1>, Dyn>>>

Available on crate features matrix and u8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u8, Dyn, Const<1>, VecStorage<u8, Dyn, Const<1>>>>

Available on crate features matrix and u8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<u8, Dyn, Dyn, VecStorage<u8, Dyn, Dyn>>>

Available on crate features matrix and u8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<usize, Const<1>, Dyn, VecStorage<usize, Const<1>, Dyn>>>

Available on crate feature matrix only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<usize, Dyn, Const<1>, VecStorage<usize, Dyn, Const<1>>>>

Available on crate feature matrix only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Matrix<usize, Dyn, Dyn, VecStorage<usize, Dyn, Dyn>>>

Available on crate feature matrix only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<MechMap>

Available on crate feature map only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<MechRecord>

Available on crate feature record only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<MechSet>

Available on crate feature set only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<MechTable>

Available on crate feature table only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<MechTuple>

Available on crate feature tuple only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<R64>

Available on crate feature rational only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<String>

Available on crate features string or variable_define only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<Value>

Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<bool>

Available on crate features bool or variable_define only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<f32>

Available on crate feature f32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<f64>

Available on crate feature f64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<i128>

Available on crate feature i128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<i16>

Available on crate feature i16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<i32>

Available on crate feature i32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<i64>

Available on crate feature i64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<i8>

Available on crate feature i8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<u128>

Available on crate feature u128 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<u16>

Available on crate feature u16 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<u32>

Available on crate feature u32 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<u64>

Available on crate feature u64 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<u8>

Available on crate feature u8 only.
Source§

fn to_value(&self) -> Value

Source§

impl ToValue for Ref<usize>

Source§

fn to_value(&self) -> Value

Source§

impl<T> Eq for Ref<T>
where T: PartialEq,

Auto Trait Implementations§

§

impl<T> Freeze for Ref<T>

§

impl<T> !RefUnwindSafe for Ref<T>

§

impl<T> !Send for Ref<T>

§

impl<T> !Sync for Ref<T>

§

impl<T> Unpin for Ref<T>

§

impl<T> !UnwindSafe for Ref<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,