pub struct SkeletalSectionPayload {
pub source_version: u16,
pub flags: u16,
pub joints: Vec<Skl2JointDescriptorV2>,
pub loop_closures: Vec<LoopClosureConstraintRecord>,
pub landmarks: Vec<TopologicalLandmarkRecord>,
pub actuation_pathways: Vec<ActuationPathwayRecord>,
pub ssm_headers: Vec<Ssm1BasisHeader>,
pub ssm_modes: Vec<Ssm1ModeWeight>,
}Expand description
Decoded SKL2 biological skeletal payload supporting lossless v1 (32B) and v2 (64B) joints.
Fields§
§source_version: u16§flags: u16§joints: Vec<Skl2JointDescriptorV2>§loop_closures: Vec<LoopClosureConstraintRecord>§landmarks: Vec<TopologicalLandmarkRecord>§actuation_pathways: Vec<ActuationPathwayRecord>§ssm_headers: Vec<Ssm1BasisHeader>§ssm_modes: Vec<Ssm1ModeWeight>Implementations§
Source§impl SkeletalSectionPayload
impl SkeletalSectionPayload
pub fn new(joints: Vec<Skl2JointDescriptorV2>) -> Self
pub fn validate(&self) -> Result<(), SkeletalSectionError>
pub fn encoded_v2_size(&self) -> usize
pub fn encoded_v1_size(&self) -> usize
Sourcepub fn encode_v2_into(
&self,
out: &mut [u8],
) -> Result<usize, SkeletalSectionError>
pub fn encode_v2_into( &self, out: &mut [u8], ) -> Result<usize, SkeletalSectionError>
Encode this payload into a caller-provided slice in SKL2 v2 (64-byte joint descriptors).
Sourcepub fn encode_v1_into(
&self,
out: &mut [u8],
) -> Result<usize, SkeletalSectionError>
pub fn encode_v1_into( &self, out: &mut [u8], ) -> Result<usize, SkeletalSectionError>
Encode this payload into a caller-provided slice in SKL2 v1 (32-byte joint descriptors).
Sourcepub fn to_bytes_v2(&self) -> Result<Vec<u8>, SkeletalSectionError>
pub fn to_bytes_v2(&self) -> Result<Vec<u8>, SkeletalSectionError>
Encode this payload to an owned Vec<u8> in SKL2 v2 format.
Sourcepub fn to_bytes_v1(&self) -> Result<Vec<u8>, SkeletalSectionError>
pub fn to_bytes_v1(&self) -> Result<Vec<u8>, SkeletalSectionError>
Encode this payload to an owned Vec<u8> in SKL2 v1 format.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, SkeletalSectionError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SkeletalSectionError>
Losslessly decode SKL2 v1 (32B joint descriptors) or SKL2 v2 (64B joint descriptors).
Trait Implementations§
Source§impl Clone for SkeletalSectionPayload
impl Clone for SkeletalSectionPayload
Source§impl Debug for SkeletalSectionPayload
impl Debug for SkeletalSectionPayload
Source§impl PartialEq for SkeletalSectionPayload
impl PartialEq for SkeletalSectionPayload
impl StructuralPartialEq for SkeletalSectionPayload
Auto Trait Implementations§
impl Freeze for SkeletalSectionPayload
impl RefUnwindSafe for SkeletalSectionPayload
impl Send for SkeletalSectionPayload
impl Sync for SkeletalSectionPayload
impl Unpin for SkeletalSectionPayload
impl UnsafeUnpin for SkeletalSectionPayload
impl UnwindSafe for SkeletalSectionPayload
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more