pub struct PossessionCalculator { /* private fields */ }Expand description
Builds the team-possession event stream from the backdating resolver’s finalized segments.
Finalized [ResolvedPossession] segments (active spans) are emitted as
PossessionEvents as soon as the resolver decides them; non-live stretches
are emitted as coalesced inactive markers so the stream stays contiguous.
The in-progress open segment is exposed via Self::current_event /
Self::projected_events for display and goal tagging.
Implementations§
Source§impl PossessionCalculator
impl PossessionCalculator
pub fn new() -> Self
pub fn events(&self) -> &[PossessionEvent]
pub fn new_events(&self) -> &[PossessionEvent]
Sourcepub fn projected_events(&self) -> Vec<PossessionEvent>
pub fn projected_events(&self) -> Vec<PossessionEvent>
All committed events plus the in-progress open/inactive span. Used by goal tagging to walk the possession that led to a goal.
pub fn flush_pending_event(&mut self)
Sourcepub fn current_event(&self) -> Option<&PossessionEvent>
pub fn current_event(&self) -> Option<&PossessionEvent>
The span covering the most recently processed frame (the open segment if live, else the last committed event).
pub fn update( &mut self, frame: &FrameInfo, possession_state: &PossessionState, live_play_state: &LivePlayState, ) -> SubtrActorResult<()>
Trait Implementations§
Source§impl Clone for PossessionCalculator
impl Clone for PossessionCalculator
Source§impl Debug for PossessionCalculator
impl Debug for PossessionCalculator
Source§impl Default for PossessionCalculator
impl Default for PossessionCalculator
Source§impl PartialEq for PossessionCalculator
impl PartialEq for PossessionCalculator
impl StructuralPartialEq for PossessionCalculator
Auto Trait Implementations§
impl Freeze for PossessionCalculator
impl RefUnwindSafe for PossessionCalculator
impl Send for PossessionCalculator
impl Sync for PossessionCalculator
impl Unpin for PossessionCalculator
impl UnsafeUnpin for PossessionCalculator
impl UnwindSafe for PossessionCalculator
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