Struct stadium::Builder[][src]

pub struct Builder<'a> { /* fields omitted */ }

A structure used to create a Stadium. This function can be created using the stadium::builder function.

Implementations

impl<'a> Builder<'a>[src]

pub fn new() -> Self[src]

Creates a new instance of Builder.

Examples

let builder = stadium::Builder::new();
// That it! Now you have your own builder.

pub fn insert<T: 'a>(&mut self, init: T) -> Handle<T>[src]

Prepares the insertion of init into the Stadium.

Panics

This function panics if it fails to allocate a box for init.

pub fn insert_raw(&mut self, meta: ObjectMeta) -> RawHandle[src]

Prepares the insertion of a MaybeUninit<T> into the Stadium where T is the type described by the given ObjectMeta structure.

pub fn insert_uninit<T>(&mut self) -> Handle<MaybeUninit<T>>[src]

Prepares the insertion of a MaybeUninit<T> into the Stadium.

pub unsafe fn insert_zeroed_raw(&mut self, meta: ObjectMeta) -> RawHandle[src]

Prepares the insertion of a T into the Stadium where T is the type described by the given ObjectMeta structure.

Safety

T must be safely created using mem::zeroed().

pub unsafe fn insert_zeroed<T>(&mut self) -> Handle<T>[src]

Prepares the insertion of a T into the Stadium.

Safety

T must be safely created using mem::zeroed().

pub fn insert_default<T: Default>(&mut self) -> Handle<T>[src]

Prepares the insertion of a T into the Stadium. The T will be automatically initialized to its default value.

pub fn build(self) -> Stadium<'a>[src]

Builds a new Stadium.

Panics

This function can panics if one of the following events occure:

  • The builder is empty
  • The function fails to allocate for the stadium

Trait Implementations

impl<'a> From<Builder<'a>> for Stadium<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Builder<'a>

impl<'a> !Send for Builder<'a>

impl<'a> !Sync for Builder<'a>

impl<'a> Unpin for Builder<'a>

impl<'a> UnwindSafe for Builder<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.