pub struct ApplyOutcome {
pub audio_changed: bool,
pub graphics_changed: bool,
pub feedback_changed: bool,
pub quality: Quality,
pub look: Look,
}Expand description
Result of applying a complete validated preference snapshot.
Change flags compare actual runtime settings, including mixer changes made
outside this module. graphics_changed includes underlying user choices even
when a URL/environment override hides them. quality and look report the
effective result with those overrides still in force. No flag implies a save,
renderer rebuild, or that a game has called sync_feedback.
use ferravex_render::preferences::{self, Preferences};
let next = Preferences { master: 0.25, quality: Some(2), ..Default::default() };
let result = preferences::try_apply(next).unwrap();
assert_eq!(result.quality, ferravex_render::lighting::Quality::High);
assert!(!preferences::try_apply(next).unwrap().changed());Fields§
§audio_changed: bool§graphics_changed: bool§feedback_changed: bool§quality: Quality§look: LookImplementations§
Trait Implementations§
Source§impl Clone for ApplyOutcome
impl Clone for ApplyOutcome
Source§fn clone(&self) -> ApplyOutcome
fn clone(&self) -> ApplyOutcome
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApplyOutcome
impl Debug for ApplyOutcome
Source§impl PartialEq for ApplyOutcome
impl PartialEq for ApplyOutcome
impl Copy for ApplyOutcome
impl Eq for ApplyOutcome
impl StructuralPartialEq for ApplyOutcome
Auto Trait Implementations§
impl Freeze for ApplyOutcome
impl RefUnwindSafe for ApplyOutcome
impl Send for ApplyOutcome
impl Sync for ApplyOutcome
impl Unpin for ApplyOutcome
impl UnwindSafe for ApplyOutcome
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