Skip to main content

ExAsRef

Trait ExAsRef 

Source
pub trait ExAsRef<T: PointeeSized>: PointeeSized {
    type ExternalTraitSpecificationFor: AsRef<T>;

    // Required methods
    spec fn as_ref_spec(&self) -> &T;
    spec fn obeys_as_ref_spec() -> bool;
    exec fn as_ref(&self) -> r : &T;
}

Required Associated Types§

Required Methods§

Source

spec fn as_ref_spec(&self) -> &T

Source

spec fn obeys_as_ref_spec() -> bool

Source

exec fn as_ref(&self) -> r : &T

ensures
Self::obeys_as_ref_spec() ==> r == self.as_ref_spec(),

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§