Trait opaque_typedef::OpaqueTypedef
[−]
[src]
pub trait OpaqueTypedef: Sized { type Inner; type Error; unsafe fn from_inner_unchecked(inner: Self::Inner) -> Self; fn from_inner(inner: Self::Inner) -> Result<Self, Self::Error>; fn into_inner(self) -> Self::Inner; fn as_inner(&self) -> &Self::Inner; unsafe fn as_inner_mut(&mut self) -> &mut Self::Inner; }
Common functions for opaque typedef-ed sized types.
Associated Types
Required Methods
unsafe fn from_inner_unchecked(inner: Self::Inner) -> Self
Creates a new value from the inner value without validation.
fn from_inner(inner: Self::Inner) -> Result<Self, Self::Error>
Creates a new value from the inner value with validation.
fn into_inner(self) -> Self::Inner
Takes and returns the inner value with its ownership.
fn as_inner(&self) -> &Self::Inner
Returns the reference to the inner value.
unsafe fn as_inner_mut(&mut self) -> &mut Self::Inner
Returns the mutable reference to the inner value.