pub struct SpatialStreamer { /* private fields */ }Implementations§
Source§impl SpatialStreamer
impl SpatialStreamer
pub fn new(abs_interval: u32) -> Self
pub fn with_config(config: SpatialStreamerConfig) -> Self
Sourcepub fn next_frame(
&mut self,
new_state: &SpatialState,
timestamp: u64,
) -> Result<SpatialFrame, SpatialError>
pub fn next_frame( &mut self, new_state: &SpatialState, timestamp: u64, ) -> Result<SpatialFrame, SpatialError>
Generates the next frame for a given state. Automatically decides whether to send ABS or DELTA.
Sourcepub fn process_frame(
&mut self,
frame: &SpatialFrame,
) -> Result<&SpatialState, SpatialError>
pub fn process_frame( &mut self, frame: &SpatialFrame, ) -> Result<&SpatialState, SpatialError>
Processes an incoming frame and updates the internal state. Handles drift correction and sequence checking.
Auto Trait Implementations§
impl Freeze for SpatialStreamer
impl RefUnwindSafe for SpatialStreamer
impl Send for SpatialStreamer
impl Sync for SpatialStreamer
impl Unpin for SpatialStreamer
impl UnwindSafe for SpatialStreamer
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