pub(crate) fn cutoff(&self, state: &State<C>, timestamp: Timestamp) -> Panorama<C> {
        let obs_cutoff = |obs: &Observation<C>| match obs {
            Observation::Correct(vhash) => state
                .swimlane(vhash)
                .find(|(_, unit)| unit.timestamp <= timestamp)
                .map(|(vh, _)| *vh)
                .map_or(Observation::None, Observation::Correct),
            obs @ Observation::None | obs @ Observation::Faulty => obs.clone(),
        };
        Panorama::from(self.iter().map(obs_cutoff).collect_vec())
    }
/// Returns the panorama seeing all units seen by `self` with a timestamp no later than
/// `timestamp`. Accusations are preserved regardless of the evidence's timestamp.
Returns the panorama seeing all units seen by `self` with a timestamp no later than
`timestamp`. Accusations are preserved regardless of the evidence's timestamp.
Returns the panorama seeing all units seen by ` self ` with a timestamp no later than ` timestamp ` . Accusations are preserved regardless of the evidence ' s timestamp .
pub(crate) fn cutoff(&self, state: &State<C>, timestamp: Timestamp) -> Panorama<C> {
        let obs_cutoff = |obs: &Observation<C>| match obs {
            Observation::Correct(vhash) => state
                .swimlane(vhash)
                .find(|(_, unit)| unit.timestamp <= timestamp)
                .map(|(vh, _)| *vh)
                .map_or(Observation::None, Observation::Correct),
            obs @ Observation::None | obs @ Observation::Faulty => obs.clone(),
        };
        Panorama::from(self.iter().map(obs_cutoff).collect_vec())
    }
pub ( crate ) fn cutoff ( & self , state : & State < C > , timestamp : Timestamp ) -> Panorama < C > { let obs_cutoff = | obs : & Observation < C > | match obs { Observation :: Correct ( vhash ) => state . swimlane ( vhash ) . find ( | ( _ , unit ) | unit . timestamp <= timestamp ) . map ( | ( vh , _ ) | * vh ) . map_or ( Observation :: None , Observation :: Correct ) , obs @ Observation :: None | obs @ Observation :: Faulty => obs . clone ( ) , } ; Panorama :: from ( self . iter ( ) . map ( obs_cutoff ) . collect_vec ( ) ) }
Returns the panorama seeing all units seen by `self` with a timestamp no later than
`timestamp`.
Returns the panorama seeing all units seen by ` self ` with a timestamp no later than ` timestamp ` .
&self
state
&State<C>
timestamp
Timestamp
&self
state
&State<C>
timestamp
Timestamp