pub struct EngineBuilder<P, R, H, F = NoFontSystem> { /* private fields */ }Expand description
Staged builder for constructing an engine with typed resource, platform, and font parameters.
Implementations§
Source§impl<P> EngineBuilder<P, (), (), NoFontSystem>
impl<P> EngineBuilder<P, (), (), NoFontSystem>
Source§impl<P, R, H, F> EngineBuilder<P, R, H, F>
impl<P, R, H, F> EngineBuilder<P, R, H, F>
Sourcepub fn format(self, format: FormatImage) -> Self
pub fn format(self, format: FormatImage) -> Self
Sets the format image for the engine being built.
Sourcepub fn packaged_format(self, packaged: Vec<u8>) -> Self
pub fn packaged_format(self, packaged: Vec<u8>) -> Self
Uses a packaged format from
pack_packaged_format instead of a format image.
Sourcepub fn resources<NextR>(self, resources: NextR) -> EngineBuilder<P, NextR, H, F>
pub fn resources<NextR>(self, resources: NextR) -> EngineBuilder<P, NextR, H, F>
Sets the resource provider for the engine being built.
Sourcepub fn platform<NextH>(self, platform: NextH) -> EngineBuilder<P, R, NextH, F>
pub fn platform<NextH>(self, platform: NextH) -> EngineBuilder<P, R, NextH, F>
Sets the platform adapter for the engine being built.
Sourcepub fn fonts<NextF>(self, fonts: NextF) -> EngineBuilder<P, R, H, NextF>
pub fn fonts<NextF>(self, fonts: NextF) -> EngineBuilder<P, R, H, NextF>
Sets the font system for the engine being built.
Source§impl<P, R, H, F> EngineBuilder<P, R, H, F>
impl<P, R, H, F> EngineBuilder<P, R, H, F>
Sourcepub fn build(self) -> Result<Engine<P, R, H, F>, BuildError>
pub fn build(self) -> Result<Engine<P, R, H, F>, BuildError>
Validates the builder state and constructs an engine.
Trait Implementations§
Auto Trait Implementations§
impl<P, R, H, F> Freeze for EngineBuilder<P, R, H, F>
impl<P, R, H, F> RefUnwindSafe for EngineBuilder<P, R, H, F>
impl<P, R, H, F> Send for EngineBuilder<P, R, H, F>
impl<P, R, H, F> Sync for EngineBuilder<P, R, H, F>
impl<P, R, H, F> Unpin for EngineBuilder<P, R, H, F>
impl<P, R, H, F> UnsafeUnpin for EngineBuilder<P, R, H, F>
impl<P, R, H, F> UnwindSafe for EngineBuilder<P, R, H, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more