pub struct Breakpoint {
pub at: Tick,
pub level: Level,
pub slope: Level,
}Expand description
A tick at which the level line of a timeline changes: it jumps, or its slope changes.
Between two consecutive breakpoints the level is level + slope * (t - at); after the last
one it is constant (slope is zero there). Three i64 per breakpoint, so a profile is as
compact as the line it describes.
Fields§
§at: TickThe tick of the change.
level: LevelThe level at at, with every impact at at applied.
slope: LevelThe level change per tick after at, until the next breakpoint.
Trait Implementations§
Source§impl Clone for Breakpoint
impl Clone for Breakpoint
impl Copy for Breakpoint
Source§impl Debug for Breakpoint
impl Debug for Breakpoint
Source§impl<'de> Deserialize<'de> for Breakpoint
impl<'de> Deserialize<'de> for Breakpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Breakpoint
Source§impl Hash for Breakpoint
impl Hash for Breakpoint
Source§impl Ord for Breakpoint
impl Ord for Breakpoint
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Breakpoint
impl PartialEq for Breakpoint
Source§impl PartialOrd for Breakpoint
impl PartialOrd for Breakpoint
Source§impl Serialize for Breakpoint
impl Serialize for Breakpoint
Source§impl Slot for Breakpoint
impl Slot for Breakpoint
impl StructuralPartialEq for Breakpoint
Auto Trait Implementations§
impl Forget for Breakpoint
impl Freeze for Breakpoint
impl Move for Breakpoint
impl RefUnwindSafe for Breakpoint
impl Send for Breakpoint
impl Sync for Breakpoint
impl Unpin for Breakpoint
impl UnsafeUnpin for Breakpoint
impl UnwindSafe for Breakpoint
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