pub struct TickContext {
pub elapsed: Duration,
pub source: TickSource,
}Expand description
Per-call context delivered to SampPlugin::on_tick.
Fields§
§elapsed: DurationWall-clock time elapsed since the previous on_tick dispatch in
this plugin instance. Duration::ZERO on the very first call.
source: TickSourceWhich server scheduled this dispatch.
Trait Implementations§
Source§impl Clone for TickContext
impl Clone for TickContext
Source§fn clone(&self) -> TickContext
fn clone(&self) -> TickContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TickContext
Auto Trait Implementations§
impl Freeze for TickContext
impl RefUnwindSafe for TickContext
impl Send for TickContext
impl Sync for TickContext
impl Unpin for TickContext
impl UnsafeUnpin for TickContext
impl UnwindSafe for TickContext
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