Skip to main content

RecBuffer

Struct RecBuffer 

Source
pub struct RecBuffer {
    pub data: Vec<u8>,
    pub count_only: bool,
}
Expand description

Growable append-only byte buffer. Doubles on demand. count_only tallies size without allocating. (b3RecBuffer)

Fields§

§data: Vec<u8>§count_only: bool

Implementations§

Source§

impl RecBuffer

Source

pub fn new() -> Self

(implicit zero-init in C)

Source

pub fn with_capacity(cap: usize) -> Self

Source

pub fn size(&self) -> i32

Source

pub fn append(&mut self, bytes: &[u8])

(b3RecBufAppend)

Source

pub fn append_u8(&mut self, v: u8)

Source

pub fn append_u16(&mut self, v: u16)

Source

pub fn append_u32(&mut self, v: u32)

Source

pub fn append_u64(&mut self, v: u64)

Source

pub fn append_i32(&mut self, v: i32)

Source

pub fn append_f32(&mut self, v: f32)

Source

pub fn append_f64(&mut self, v: f64)

Source

pub fn append_bool(&mut self, v: bool)

Source

pub fn append_vec3(&mut self, v: Vec3)

Source

pub fn append_quat(&mut self, v: Quat)

Source

pub fn append_transform(&mut self, v: Transform)

Source

pub fn append_pos(&mut self, v: Pos)

Source

pub fn append_world_xf(&mut self, v: WorldTransform)

Source

pub fn append_matrix3(&mut self, v: Matrix3)

Source

pub fn append_aabb(&mut self, v: Aabb)

Source

pub fn append_sphere(&mut self, v: Sphere)

Source

pub fn append_capsule(&mut self, v: Capsule)

Source

pub fn append_filter(&mut self, v: Filter)

Source

pub fn append_material(&mut self, v: SurfaceMaterial)

Source§

impl RecBuffer

Source

pub fn append_vec2(&mut self, v: Vec2)

Source

pub fn append_softness(&mut self, v: Softness)

Source§

impl RecBuffer

Source

pub fn append_str(&mut self, s: &str)

(b3RecW_STR)

Source

pub fn append_str_null(&mut self)

Null string sentinel used when C passes NULL. (b3RecW_STR NULL path)

Source

pub fn append_world_id(&mut self, v: WorldId)

Source

pub fn append_body_id(&mut self, v: BodyId)

Source

pub fn append_shape_id(&mut self, v: ShapeId)

Source

pub fn append_joint_id(&mut self, v: JointId)

Source

pub fn append_mass_data(&mut self, v: MassData)

Source

pub fn append_locks(&mut self, v: MotionLocks)

Source

pub fn append_query_filter(&mut self, v: &QueryFilter)

Source

pub fn append_shape_proxy(&mut self, v: &ShapeProxy)

Source

pub fn append_explosion_def(&mut self, v: ExplosionDef)

Source

pub fn append_body_def(&mut self, v: &BodyDef)

(b3RecW_BODYDEF)

Source

pub fn append_shape_def(&mut self, v: &ShapeDef)

(b3RecW_SHAPEDEF)

Source

pub fn append_parallel_joint_def(&mut self, v: &ParallelJointDef)

Source

pub fn append_distance_joint_def(&mut self, v: &DistanceJointDef)

Source

pub fn append_filter_joint_def(&mut self, v: &FilterJointDef)

Source

pub fn append_motor_joint_def(&mut self, v: &MotorJointDef)

Source

pub fn append_prismatic_joint_def(&mut self, v: &PrismaticJointDef)

Source

pub fn append_revolute_joint_def(&mut self, v: &RevoluteJointDef)

Source

pub fn append_spherical_joint_def(&mut self, v: &SphericalJointDef)

Source

pub fn append_weld_joint_def(&mut self, v: &WeldJointDef)

Source

pub fn append_wheel_joint_def(&mut self, v: &WheelJointDef)

Trait Implementations§

Source§

impl Clone for RecBuffer

Source§

fn clone(&self) -> RecBuffer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecBuffer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RecBuffer

Source§

fn default() -> RecBuffer

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.