TimedInstruction::set_time

This commit is contained in:
2025-01-15 03:22:19 -08:00
parent fbacef83b9
commit c2d6af8bda
2 changed files with 10 additions and 6 deletions
lib/common/src
strafe-client/src

@ -5,6 +5,14 @@ pub struct TimedInstruction<I,T>{
pub time:Time<T>,
pub instruction:I,
}
impl<I,T> TimedInstruction<I,T>{
pub fn set_time<TimeInner>(self,new_time:Time<TimeInner>)->TimedInstruction<I,TimeInner>{
TimedInstruction{
time:new_time,
instruction:self.instruction,
}
}
}
/// Ensure all emitted instructions are processed before consuming external instructions
pub trait InstructionEmitter<I>{