#[repr(transparent)]pub struct PortalControlCommand {
pub raw: u64,
}Expand description
Packed ICP command (8 bytes).
Fields§
§raw: u64Implementations§
Source§impl PortalControlCommand
impl PortalControlCommand
pub const fn empty() -> Self
pub fn opcode(self) -> u8
pub fn has_icp_magic(self) -> bool
pub fn param_a_i16(self) -> i16
pub fn param_b_i8(self) -> i8
pub fn channel(self) -> u8
pub fn with_magic(self) -> Self
pub fn pack( opcode: u8, channel: u8, index: u16, param_a: i16, param_b: i8, ) -> Self
Sourcepub fn set_camera_delta_scaled(dyaw: f32, dpitch: f32, dzoom: f32) -> Self
pub fn set_camera_delta_scaled(dyaw: f32, dpitch: f32, dzoom: f32) -> Self
Pack camera deltas: param_a = dyaw×1000, index = dpitch×1000 (i16), param_b = dzoom×1000.
pub fn decode_camera_delta(self) -> (f32, f32, f32)
pub fn collapse_q(index: u16) -> Self
pub fn standpoint_scalar(kind: u8, delta: f32) -> Self
Sourcepub fn sonic_token_forward(token_raw: u64) -> Self
pub fn sonic_token_forward(token_raw: u64) -> Self
Embed a Sonic Token payload (bits 0..62); opcode + ICP magic in low byte / bit 63.
pub fn embedded_sonic_raw(self) -> u64
Trait Implementations§
Source§impl Clone for PortalControlCommand
impl Clone for PortalControlCommand
Source§fn clone(&self) -> PortalControlCommand
fn clone(&self) -> PortalControlCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PortalControlCommand
impl Debug for PortalControlCommand
Source§impl PartialEq for PortalControlCommand
impl PartialEq for PortalControlCommand
Source§fn eq(&self, other: &PortalControlCommand) -> bool
fn eq(&self, other: &PortalControlCommand) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for PortalControlCommand
impl Eq for PortalControlCommand
impl StructuralPartialEq for PortalControlCommand
Auto Trait Implementations§
impl Freeze for PortalControlCommand
impl RefUnwindSafe for PortalControlCommand
impl Send for PortalControlCommand
impl Sync for PortalControlCommand
impl Unpin for PortalControlCommand
impl UnsafeUnpin for PortalControlCommand
impl UnwindSafe for PortalControlCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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