Skip to main content

ExoticFact

Trait ExoticFact 

Source
pub trait ExoticFact:
    DynHash
    + DynEq
    + Send
    + Sync
    + Debug
    + DynClone
    + Downcast {
    // Required method
    fn buffer_sizes(&self) -> TVec<TDim>;

    // Provided methods
    fn compatible_with(&self, other: &dyn ExoticFact) -> bool { ... }
    fn clarify_dt_shape(&self) -> Option<(DatumType, TVec<TDim>)> { ... }
    fn mem_size(&self) -> TDim { ... }
}

Required Methods§

Provided Methods§

Source

fn compatible_with(&self, other: &dyn ExoticFact) -> bool

Whether or not it is acceptable for a Patch to substitute self by other.

In other terms, all operators consuming self MUST accept also accept other without being altered.

Source

fn clarify_dt_shape(&self) -> Option<(DatumType, TVec<TDim>)>

Source

fn mem_size(&self) -> TDim

Implementations§

Source§

impl dyn ExoticFact

Source

pub fn is<__T: ExoticFact>(&self) -> bool

Returns true if the trait object wraps an object of type __T.

Source

pub fn downcast<__T: ExoticFact>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

Source

pub fn downcast_rc<__T: ExoticFact>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

Source

pub fn downcast_ref<__T: ExoticFact>(&self) -> Option<&__T>

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

Source

pub fn downcast_mut<__T: ExoticFact>(&mut self) -> Option<&mut __T>

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Trait Implementations§

Source§

impl<'eq> Eq for dyn ExoticFact + 'eq

Source§

impl<'eq> Eq for dyn ExoticFact + Send + 'eq

Source§

impl<'eq> Eq for dyn ExoticFact + Sync + 'eq

Source§

impl<'eq> Eq for dyn ExoticFact + Send + Sync + 'eq

Source§

impl<T: ExoticFact> From<T> for Box<dyn ExoticFact>

Source§

fn from(v: T) -> Self

Converts to this type from the input type.
Source§

impl<'hash> Hash for dyn ExoticFact + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'hash> Hash for dyn ExoticFact + Send + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'hash> Hash for dyn ExoticFact + Sync + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'hash> Hash for dyn ExoticFact + Send + Sync + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'eq> PartialEq for dyn ExoticFact + 'eq

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'eq> PartialEq for dyn ExoticFact + Send + 'eq

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'eq> PartialEq for dyn ExoticFact + Sync + 'eq

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'eq> PartialEq for dyn ExoticFact + Send + Sync + 'eq

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'eq> PartialEq<&Box<dyn ExoticFact + 'eq>> for Box<dyn ExoticFact + 'eq>

Source§

fn eq(&self, other: &&Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'eq> PartialEq<&Box<dyn ExoticFact + Send + 'eq>> for Box<dyn ExoticFact + Send + 'eq>

Source§

fn eq(&self, other: &&Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'eq> PartialEq<&Box<dyn ExoticFact + Send + Sync + 'eq>> for Box<dyn ExoticFact + Send + Sync + 'eq>

Source§

fn eq(&self, other: &&Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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<'eq> PartialEq<&Box<dyn ExoticFact + Sync + 'eq>> for Box<dyn ExoticFact + Sync + 'eq>

Source§

fn eq(&self, other: &&Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§