pub enum SessionStepError {
NotPaused {
state: SessionState,
},
}Expand description
A rejected request to issue an inspector tick with GameSession::step_paused.
use ferravex_core::session::{GameSession, SessionState, SessionStepError};
let mut session = GameSession::new(60.0, 8, false);
let error = session.step_paused().unwrap_err();
assert_eq!(error, SessionStepError::NotPaused { state: SessionState::Ready });
assert_eq!(session.tick(), 0);Variants§
NotPaused
The session must be Paused; the state and clock were left unchanged.
Fields
§
state: SessionStateThe state in which stepping was requested.
Trait Implementations§
Source§impl Clone for SessionStepError
impl Clone for SessionStepError
Source§fn clone(&self) -> SessionStepError
fn clone(&self) -> SessionStepError
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 SessionStepError
impl Debug for SessionStepError
Source§impl Display for SessionStepError
impl Display for SessionStepError
Source§impl Error for SessionStepError
impl Error for SessionStepError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for SessionStepError
impl PartialEq for SessionStepError
impl Copy for SessionStepError
impl Eq for SessionStepError
impl StructuralPartialEq for SessionStepError
Auto Trait Implementations§
impl Freeze for SessionStepError
impl RefUnwindSafe for SessionStepError
impl Send for SessionStepError
impl Sync for SessionStepError
impl Unpin for SessionStepError
impl UnwindSafe for SessionStepError
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