Skip to main content

SharedParam

Trait SharedParam 

Source
pub trait SharedParam {
    // Required method
    fn same_allocation(&self, other: &Self) -> bool;
}
Expand description

A parameter that points at a shared allocation: two that point at the same one are equal without comparing what it holds.

Required Methods§

Source

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

Whether self and other point at the same allocation.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: ?Sized> SharedParam for Arc<T>

Source§

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

Source§

impl<T: ?Sized> SharedParam for Rc<T>

Source§

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

Implementors§