pub struct Config {Show 21 fields
pub name: String,
pub title: Option<String>,
pub crash: Option<Crash>,
pub version: String,
pub scene: Option<PathBuf>,
pub settings: Settings,
pub screen: ScreenPolicy,
pub device: Option<Device>,
pub render_scale: f32,
pub budget: Option<Budget>,
pub filter: Filter,
pub exposure: Exposure,
pub fonts: Vec<Vec<u8>>,
pub pads: Pads,
pub seed: u64,
pub sound: bool,
pub layout: Option<Box<dyn LayoutSource>>,
pub icons: Option<Icons>,
pub sprites: Option<SpriteImage>,
pub environment: Option<EnvironmentTexels>,
pub warm_budget: f64,
}Fields§
§name: String§title: Option<String>§crash: Option<Crash>§version: String§scene: Option<PathBuf>§settings: Settings§screen: ScreenPolicy§device: Option<Device>§render_scale: f32§budget: Option<Budget>§filter: Filter§exposure: Exposure§fonts: Vec<Vec<u8>>§pads: Pads§seed: u64§sound: bool§layout: Option<Box<dyn LayoutSource>>§icons: Option<Icons>§sprites: Option<SpriteImage>§environment: Option<EnvironmentTexels>§warm_budget: f64Implementations§
Source§impl Config
impl Config
pub fn new( name: impl Into<String>, version: impl Into<String>, scene: impl Into<PathBuf>, ) -> Self
pub fn flat(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn bind_text(&self)
pub fn warm_budget(self, seconds: f64) -> Self
pub fn title(self, title: impl Into<String>) -> Self
pub fn window_title(&self) -> &str
pub fn crash(self, hook: impl Fn(&str) + 'static) -> Self
pub fn settings(self, settings: Settings) -> Self
pub fn screen(self, screen: ScreenPolicy) -> Self
pub fn device(self, device: Device) -> Self
pub fn render_scale(self, scale: f32) -> Self
pub fn budget(self, budget: Budget) -> Self
pub fn exposure(self, exposure: Exposure) -> Self
pub fn filter(self, filter: Filter) -> Self
pub fn font(self, bytes: impl Into<Vec<u8>>) -> Self
pub fn pads(self, pads: Pads) -> Self
pub fn seed(self, seed: u64) -> Self
pub fn layout(self, layout: Box<dyn LayoutSource>) -> Self
pub fn icons(self, icons: Icons) -> Self
pub fn sprites(self, sprites: SpriteImage) -> Self
pub fn environment(self, environment: EnvironmentTexels) -> Self
pub fn sound(self, on: bool) -> Self
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl !UnwindSafe for Config
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.