pub struct FrameStride {
pub frame_size: usize,
pub hop_size: usize,
}Expand description
Re-exports the math signal core API. Data type for frame stride.
Fields§
§frame_size: usizeThe frame size value.
hop_size: usizeThe hop size value.
Implementations§
Source§impl FrameStride
impl FrameStride
Sourcepub fn new(
frame_size: usize,
hop_size: usize,
) -> Result<FrameStride, DetectError>
pub fn new( frame_size: usize, hop_size: usize, ) -> Result<FrameStride, DetectError>
Creates a new value.
Sourcepub fn frame_count(self, samples_len: usize) -> usize
pub fn frame_count(self, samples_len: usize) -> usize
Returns frame count.
Trait Implementations§
Source§impl Clone for FrameStride
impl Clone for FrameStride
Source§fn clone(&self) -> FrameStride
fn clone(&self) -> FrameStride
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 moreimpl Copy for FrameStride
Source§impl Debug for FrameStride
impl Debug for FrameStride
impl Eq for FrameStride
Source§impl From<FrameSpec> for FrameStride
impl From<FrameSpec> for FrameStride
Source§impl PartialEq for FrameStride
impl PartialEq for FrameStride
Source§fn eq(&self, other: &FrameStride) -> bool
fn eq(&self, other: &FrameStride) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FrameStride
Source§impl TryFrom<FrameStride> for FrameSpec
impl TryFrom<FrameStride> for FrameSpec
Source§type Error = DetectError
type Error = DetectError
The type returned in the event of a conversion error.
Source§fn try_from(value: FrameStride) -> Result<Self>
fn try_from(value: FrameStride) -> Result<Self>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for FrameStride
impl RefUnwindSafe for FrameStride
impl Send for FrameStride
impl Sync for FrameStride
impl Unpin for FrameStride
impl UnsafeUnpin for FrameStride
impl UnwindSafe for FrameStride
Blanket Implementations§
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