pub struct NeighborData {
pub source_bin: u32,
pub frame_id: u64,
pub value: Complex,
pub magnitude: f32,
pub phase: f32,
pub phase_derivative: f32,
pub spectral_flux: f32,
}Expand description
Neighbor data exchanged via K2K messaging.
Fields§
§source_bin: u32Source bin index.
frame_id: u64Frame ID.
value: ComplexComplex value.
magnitude: f32Magnitude.
phase: f32Phase.
phase_derivative: f32Temporal derivative (phase change from previous frame).
spectral_flux: f32Spectral flux (magnitude change).
Implementations§
Source§impl NeighborData
impl NeighborData
Sourcepub fn from_bin(
bin: &FrequencyBin,
phase_derivative: f32,
spectral_flux: f32,
) -> Self
pub fn from_bin( bin: &FrequencyBin, phase_derivative: f32, spectral_flux: f32, ) -> Self
Create neighbor data from a frequency bin.
Trait Implementations§
Source§impl Archive for NeighborData
impl Archive for NeighborData
Source§type Archived = ArchivedNeighborData
type Archived = ArchivedNeighborData
The archived representation of this type. Read more
Source§type Resolver = NeighborDataResolver
type Resolver = NeighborDataResolver
The resolver for this type. It must contain all the additional information from serializing
needed to make the archived type from the normal type.
Source§impl Clone for NeighborData
impl Clone for NeighborData
Source§fn clone(&self) -> NeighborData
fn clone(&self) -> NeighborData
Returns a duplicate of the value. Read more
1.0.0 · 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 NeighborData
impl Debug for NeighborData
Source§impl<__D: Fallible + ?Sized> Deserialize<NeighborData, __D> for Archived<NeighborData>
impl<__D: Fallible + ?Sized> Deserialize<NeighborData, __D> for Archived<NeighborData>
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<NeighborData, __D::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<NeighborData, __D::Error>
Deserializes using the given deserializer
Source§impl RingMessage for NeighborData
impl RingMessage for NeighborData
Source§fn message_type() -> u64
fn message_type() -> u64
Get the message type discriminator.
Source§fn message_id(&self) -> MessageId
fn message_id(&self) -> MessageId
Get the message ID.
Source§fn deserialize(bytes: &[u8]) -> Result<Self>
fn deserialize(bytes: &[u8]) -> Result<Self>
Deserialize a message from bytes.
Source§fn correlation_id(&self) -> CorrelationId
fn correlation_id(&self) -> CorrelationId
Get the correlation ID (if any).
Auto Trait Implementations§
impl Freeze for NeighborData
impl RefUnwindSafe for NeighborData
impl Send for NeighborData
impl Sync for NeighborData
impl Unpin for NeighborData
impl UnwindSafe for NeighborData
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be unsized. Read moreSource§type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
Source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
Creates the archived version of the metadata for this value at the given position and writes
it to the given output. Read more
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,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.