Trait opaque_typedef::OpaqueTypedefUnsized
[−]
[src]
pub trait OpaqueTypedefUnsized { type Inner: ?Sized; type Error; unsafe fn from_inner_unchecked(inner: &Self::Inner) -> &Self; unsafe fn from_inner_unchecked_mut(inner: &mut Self::Inner) -> &mut Self; fn from_inner(inner: &Self::Inner) -> Result<&Self, Self::Error>; fn from_inner_mut(inner: &mut Self::Inner) -> Result<&mut Self, Self::Error>; fn as_inner(&self) -> &Self::Inner; unsafe fn as_inner_mut(&mut self) -> &mut Self::Inner; }
Common functions for opaque typedef-ed unsized types.
Associated Types
Required Methods
unsafe fn from_inner_unchecked(inner: &Self::Inner) -> &Self
Creates a reference from the inner reference without validation.
unsafe fn from_inner_unchecked_mut(inner: &mut Self::Inner) -> &mut Self
Creates a mutable reference from the inner mutable reference without validation.
fn from_inner(inner: &Self::Inner) -> Result<&Self, Self::Error>
Creates a reference from the inner reference with validation.
fn from_inner_mut(inner: &mut Self::Inner) -> Result<&mut Self, Self::Error>
Creates a mutable reference from the inner mutable reference with validation.
fn as_inner(&self) -> &Self::Inner
Returns the inner reference.
unsafe fn as_inner_mut(&mut self) -> &mut Self::Inner
Returns the inner mutable reference.