Skip to main content

RecReader

Struct RecReader 

Source
pub struct RecReader<'a> {
    pub data: &'a [u8],
    pub size: i32,
    pub cursor: i32,
    pub ok: bool,
    pub diverged: bool,
    pub world: *mut World,
    pub owner: Option<*mut RecPlayer>,
    pub slots: Vec<RegistrySlot>,
    pub tags: Vec<RecTag>,
    pub pending_query_key: u64,
    pub pending_body_create: Option<BodyId>,
    pub pending_body_destroy: Option<BodyId>,
}
Expand description

Reader state threaded through the replay loop. (b3RecReader)

Fields§

§data: &'a [u8]§size: i32§cursor: i32§ok: bool§diverged: bool§world: *mut World§owner: Option<*mut RecPlayer>§slots: Vec<RegistrySlot>§tags: Vec<RecTag>§pending_query_key: u64§pending_body_create: Option<BodyId>§pending_body_destroy: Option<BodyId>

Implementations§

Source§

impl<'a> RecReader<'a>

Source

pub fn new(data: &'a [u8]) -> Self

Source

pub fn snap(&mut self) -> SnapReader<'a>

Source

pub fn sync_from(&mut self, r: &SnapReader<'_>)

Source

pub fn make_body_id(&self, recorded: BodyId) -> BodyId

Source

pub fn make_shape_id(&self, recorded: ShapeId) -> ShapeId

Source

pub fn make_joint_id(&self, recorded: JointId) -> JointId

Source

pub fn check_id( ok: &mut bool, kind: &str, got_index: i32, got_gen: u16, rec_index: i32, rec_gen: u16, )

Auto Trait Implementations§

§

impl<'a> !Send for RecReader<'a>

§

impl<'a> !Sync for RecReader<'a>

§

impl<'a> Freeze for RecReader<'a>

§

impl<'a> RefUnwindSafe for RecReader<'a>

§

impl<'a> Unpin for RecReader<'a>

§

impl<'a> UnsafeUnpin for RecReader<'a>

§

impl<'a> UnwindSafe for RecReader<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.