pub struct NestingStack { /* private fields */ }Expand description
A stack of nested realms (OCS §7).
Implementations§
Source§impl NestingStack
impl NestingStack
Sourcepub fn push(&mut self, realm_usri: &str, time_dilation: f64) -> &NestedRealm
pub fn push(&mut self, realm_usri: &str, time_dilation: f64) -> &NestedRealm
Push a new nested realm onto the stack.
Sourcepub fn pop(&mut self) -> Option<NestedRealm>
pub fn pop(&mut self) -> Option<NestedRealm>
Pop the top realm off the stack.
Sourcepub fn current(&self) -> Option<&NestedRealm>
pub fn current(&self) -> Option<&NestedRealm>
Get the current (top) realm.
Sourcepub fn cumulative_time_dilation(&self) -> f64
pub fn cumulative_time_dilation(&self) -> f64
Compute the cumulative time dilation from base to current level.
Sourcepub fn base_to_current_time(&self, base_tau_secs: f64) -> f64
pub fn base_to_current_time(&self, base_tau_secs: f64) -> f64
Convert base time to time at the current nesting level.
Trait Implementations§
Source§impl Clone for NestingStack
impl Clone for NestingStack
Source§impl Debug for NestingStack
impl Debug for NestingStack
Auto Trait Implementations§
impl Freeze for NestingStack
impl RefUnwindSafe for NestingStack
impl Send for NestingStack
impl Sync for NestingStack
impl Unpin for NestingStack
impl UnsafeUnpin for NestingStack
impl UnwindSafe for NestingStack
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