pub struct StftParamsBuilder { /* private fields */ }Expand description
Builder for StftParams.
Implementations§
Source§impl StftParamsBuilder
impl StftParamsBuilder
Sourcepub const fn n_fft(self, n_fft: NonZeroUsize) -> Self
pub const fn n_fft(self, n_fft: NonZeroUsize) -> Self
Sourcepub const fn hop_size(self, hop_size: NonZeroUsize) -> Self
pub const fn hop_size(self, hop_size: NonZeroUsize) -> Self
Sourcepub fn window(self, window: WindowType) -> Self
pub fn window(self, window: WindowType) -> Self
Sourcepub const fn centre(self, centre: bool) -> Self
pub const fn centre(self, centre: bool) -> Self
Set whether to center frames (pad input signal).
Sourcepub fn build(self) -> SpectrogramResult<StftParams>
pub fn build(self) -> SpectrogramResult<StftParams>
Build the StftParams.
§Errors
Returns an error if:
n_fftorhop_sizeare not set or are zerohop_size>n_fft
Trait Implementations§
Source§impl Clone for StftParamsBuilder
impl Clone for StftParamsBuilder
Source§fn clone(&self) -> StftParamsBuilder
fn clone(&self) -> StftParamsBuilder
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 StftParamsBuilder
impl Debug for StftParamsBuilder
Auto Trait Implementations§
impl Freeze for StftParamsBuilder
impl RefUnwindSafe for StftParamsBuilder
impl Send for StftParamsBuilder
impl Sync for StftParamsBuilder
impl Unpin for StftParamsBuilder
impl UnwindSafe for StftParamsBuilder
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