pub struct MultiTargetConversionRequest {
pub id: String,
pub source_audio: Vec<f32>,
pub source_sample_rate: u32,
pub conversion_type: ConversionType,
pub targets: Vec<NamedTarget>,
pub realtime: bool,
pub quality_level: f32,
pub parameters: HashMap<String, f32>,
pub timestamp: SystemTime,
}Expand description
Multi-target conversion request
Fields§
§id: StringRequest ID
source_audio: Vec<f32>Source audio data
source_sample_rate: u32Source sample rate
conversion_type: ConversionTypeConversion type to apply to all targets
targets: Vec<NamedTarget>Multiple conversion targets
realtime: boolReal-time processing flag
quality_level: f32Quality level (0.0 to 1.0)
parameters: HashMap<String, f32>Processing parameters
timestamp: SystemTimeRequest timestamp
Implementations§
Source§impl MultiTargetConversionRequest
impl MultiTargetConversionRequest
Sourcepub fn new(
id: String,
source_audio: Vec<f32>,
source_sample_rate: u32,
conversion_type: ConversionType,
targets: Vec<NamedTarget>,
) -> Self
pub fn new( id: String, source_audio: Vec<f32>, source_sample_rate: u32, conversion_type: ConversionType, targets: Vec<NamedTarget>, ) -> Self
Create new multi-target conversion request
Sourcepub fn with_realtime(self, realtime: bool) -> Self
pub fn with_realtime(self, realtime: bool) -> Self
Enable real-time processing
Sourcepub fn with_quality_level(self, level: f32) -> Self
pub fn with_quality_level(self, level: f32) -> Self
Set quality level
Sourcepub fn with_parameter(self, key: String, value: f32) -> Self
pub fn with_parameter(self, key: String, value: f32) -> Self
Add parameter
Sourcepub fn add_target(self, target: NamedTarget) -> Self
pub fn add_target(self, target: NamedTarget) -> Self
Add a target
Sourcepub fn source_duration(&self) -> f32
pub fn source_duration(&self) -> f32
Get source duration in seconds
Trait Implementations§
Source§impl Clone for MultiTargetConversionRequest
impl Clone for MultiTargetConversionRequest
Source§fn clone(&self) -> MultiTargetConversionRequest
fn clone(&self) -> MultiTargetConversionRequest
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 MultiTargetConversionRequest
impl Debug for MultiTargetConversionRequest
Source§impl<'de> Deserialize<'de> for MultiTargetConversionRequest
impl<'de> Deserialize<'de> for MultiTargetConversionRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MultiTargetConversionRequest
impl RefUnwindSafe for MultiTargetConversionRequest
impl Send for MultiTargetConversionRequest
impl Sync for MultiTargetConversionRequest
impl Unpin for MultiTargetConversionRequest
impl UnsafeUnpin for MultiTargetConversionRequest
impl UnwindSafe for MultiTargetConversionRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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