[][src]Struct starstruck::StarstruckBuilder

pub struct StarstruckBuilder<S: State, R, A: GpuAllocator<Backend, Device>> { /* fields omitted */ }

The main way to construct a starstruck instance

Examples

use starstruck::StarstruckBuilder;

let starstruck = StarstruckBuilder::new().init()?;

Methods

impl StarstruckBuilder<(), Result<(), Error>, DefaultGpuAllocator<DefaultChunk<Backend, Device>, Backend, Device>>[src]

pub fn new() -> Self[src]

impl<S: State, F: Future<Item = S, Error = Error> + Send + 'static, R: IntoFuture<Future = F, Item = S, Error = Error> + 'static> StarstruckBuilder<S, R, DefaultGpuAllocator<DefaultChunk<Backend, Device>, Backend, Device>>[src]

pub fn new_with_setup<T: 'static + FnMut(Arc<SetupContext>) -> R + Send>(
    setup_callback: T
) -> Self
[src]

pub fn with_title(self, title: &str) -> Self[src]

impl<S: State, F: Future<Item = S, Error = Error> + Send + 'static, R: IntoFuture<Future = F, Item = S, Error = Error> + 'static, A: GpuAllocator<Backend, Device>> StarstruckBuilder<S, R, A>[src]

pub fn with_render_callback<T: 'static + FnMut((&mut S, &mut Context<A, Backend, Device, Instance>)) -> Result<(), Error>>(
    self,
    callback: T
) -> Self
[src]

pub fn init(self) -> Result<Starstruck<S, A>, Error>[src]

Trait Implementations

impl Default for StarstruckBuilder<(), Result<(), Error>, DefaultGpuAllocator<DefaultChunk<Backend, Device>, Backend, Device>>[src]

Auto Trait Implementations

impl<S, R, A> !Send for StarstruckBuilder<S, R, A>

impl<S, R, A> !Sync for StarstruckBuilder<S, R, A>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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

impl<T> Supports for T[src]

impl<T> Erased for T

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.