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

Inner type.

Validation error type.

Required Methods

Creates a new value from the inner value without validation.

Creates a new value from the inner value with validation.

Takes and returns the inner value with its ownership.

Returns the reference to the inner value.

Returns the mutable reference to the inner value.

Implementors