[][src]Struct arithmetic_eval::OpaqueRef

pub struct OpaqueRef { /* fields omitted */ }

Opaque reference to a native value.

The references cannot be created by interpreted code, but can be used as function args or return values of native functions. References are Rc'd, thus can easily be cloned.

References are comparable among each other:

  • If the wrapped value implements PartialEq, this implementation will be used for comparison.
  • If PartialEq is not implemented, the comparison is by the Rc pointer.

Implementations

impl OpaqueRef[src]

pub fn new<T>(value: T) -> Self where
    T: Any + Debug + PartialEq
[src]

Creates a reference to value that implements equality comparison.

Prefer using this method if the wrapped type implements PartialEq.

pub fn with_identity_eq<T>(value: T) -> Self where
    T: Any + Debug
[src]

Creates a reference to value with the identity comparison: values are considered equal iff they point to the same data.

Prefer Self::new() when possible.

pub fn downcast_ref<T: Any>(&self) -> Option<&T>[src]

Tries to downcast this reference to a specific type.

Trait Implementations

impl Clone for OpaqueRef[src]

impl Debug for OpaqueRef[src]

impl Display for OpaqueRef[src]

impl PartialEq<OpaqueRef> for OpaqueRef[src]

Auto Trait Implementations

impl !RefUnwindSafe for OpaqueRef

impl !Send for OpaqueRef

impl !Sync for OpaqueRef

impl Unpin for OpaqueRef

impl !UnwindSafe for OpaqueRef

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,