pub enum ParameterError {
OutOfRange {
parameter: String,
value: String,
min: String,
max: String,
reason: String,
},
InvalidValue {
parameter: String,
reason: String,
},
Missing {
parameter: String,
},
InvalidConfiguration {
operation: String,
reason: String,
},
}Expand description
Errors related to invalid parameters, ranges, or configuration values.
This covers validation failures for user-provided parameters to audio processing operations, including range violations and invalid configurations.
Variants§
OutOfRange
A parameter value is outside the valid range for the operation.
Fields
InvalidValue
A parameter has an invalid value that doesn’t meet operation requirements.
Fields
Missing
Required parameters are missing or empty.
InvalidConfiguration
A configuration object contains conflicting or invalid settings.
Implementations§
Source§impl ParameterError
impl ParameterError
Sourcepub fn out_of_range<P, V, Min, Max, R>(
parameter: P,
value: V,
min: Min,
max: Max,
reason: R,
) -> Self
pub fn out_of_range<P, V, Min, Max, R>( parameter: P, value: V, min: Min, max: Max, reason: R, ) -> Self
Create a new out-of-range parameter error.
Sourcepub fn invalid_value<P, R>(parameter: P, reason: R) -> Self
pub fn invalid_value<P, R>(parameter: P, reason: R) -> Self
Create a new invalid value parameter error.
Trait Implementations§
Source§impl Clone for ParameterError
impl Clone for ParameterError
Source§fn clone(&self) -> ParameterError
fn clone(&self) -> ParameterError
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 ParameterError
impl Debug for ParameterError
Source§impl Display for ParameterError
impl Display for ParameterError
Source§impl Error for ParameterError
impl Error for ParameterError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<&str> for ParameterError
impl From<&str> for ParameterError
Source§impl From<ParameterError> for AudioSampleError
impl From<ParameterError> for AudioSampleError
Source§fn from(source: ParameterError) -> Self
fn from(source: ParameterError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParameterError
impl RefUnwindSafe for ParameterError
impl Send for ParameterError
impl Sync for ParameterError
impl Unpin for ParameterError
impl UnwindSafe for ParameterError
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