pub trait AsARef<T: ?Sized> {
    fn as_aref(this: &Self) -> ARef<'_, T>;
    fn try_as_aref(this: &Self) -> Result<ARef<'_, T>, BorrowError>;
    fn as_ref_cell(this: &Self) -> Option<&RefCell<T>>;
}
Expand description

Obtain an ARef from either a normal pointer or a RefCell.

Required Methods

Get an ARef pointing at this type.

Try and get an ARef pointing at this type. Returns an Err if the type Self is a RefCell which is already mutably borrowed.

Return the underlying RefCell if Self is one, otherwise None.

Implementations on Foreign Types

Implementors