Skip to main content

CliError

Enum CliError 

Source
pub enum CliError {
Show 33 variants Config { message: String, }, File { operation: String, path: String, source: Error, }, AudioFormat { format: String, supported: String, }, VoiceNotFound { voice_id: String, available: String, }, InvalidParameter { parameter: String, message: String, }, Sdk(VoirsError), Serialization(Error), Toml(Error), Io(Error), VoiceError(String), AudioError(String), SynthesisError(String), ValidationError(String), IoError(String), SerializationError(String), InvalidArgument(String), NotImplemented(String), InteractiveError(String), PackagingError(String), UpdateError(String), EmotionError(String), CloningError(String), ConversionError(String), SingingError(String), SpatialError(String), ModelLoadingError(String), FeatureNotAvailable(String), MissingDependency(String), HardwareRequirement(String), NetworkError(String), PerformanceWarning(String), Workflow(String), Advanced(Box<AdvancedError>),
}
Expand description

CLI-specific error types

Variants§

§

Config

Configuration error

Fields

§message: String
§

File

File operation error

Fields

§operation: String
§path: String
§source: Error
§

AudioFormat

Audio format error

Fields

§format: String
§supported: String
§

VoiceNotFound

Voice not found error

Fields

§voice_id: String
§available: String
§

InvalidParameter

Invalid parameter error

Fields

§parameter: String
§message: String
§

Sdk(VoirsError)

SDK error wrapper

§

Serialization(Error)

Serialization error

§

Toml(Error)

TOML serialization error

§

Io(Error)

IO error

§

VoiceError(String)

Voice error for interactive mode

§

AudioError(String)

Audio error for interactive mode

§

SynthesisError(String)

Synthesis error for interactive mode

§

ValidationError(String)

Validation error

§

IoError(String)

IO error with message

§

SerializationError(String)

Serialization error with message

§

InvalidArgument(String)

Invalid argument error

§

NotImplemented(String)

Not implemented error

§

InteractiveError(String)

Interactive error

§

PackagingError(String)

Packaging error

§

UpdateError(String)

Update error

§

EmotionError(String)

Emotion control error

§

CloningError(String)

Voice cloning error

§

ConversionError(String)

Voice conversion error

§

SingingError(String)

Singing synthesis error

§

SpatialError(String)

Spatial audio error

§

ModelLoadingError(String)

Model loading error

§

FeatureNotAvailable(String)

Feature not available error

§

MissingDependency(String)

Dependency missing error

§

HardwareRequirement(String)

Hardware requirement error

§

NetworkError(String)

Network error

§

PerformanceWarning(String)

Performance warning

§

Workflow(String)

Workflow execution error

§

Advanced(Box<AdvancedError>)

Advanced error with rich context

Implementations§

Source§

impl CliError

Source

pub fn monitoring_error<S: Into<String>>(message: S) -> Self

Source§

impl CliError

Source

pub fn config<S: Into<String>>(message: S) -> Self

Create a configuration error

Source

pub fn file_operation<S: Into<String>>( operation: S, path: S, source: Error, ) -> Self

Create a file operation error

Source

pub fn audio_format<S: Into<String>>(format: S) -> Self

Create an audio format error

Source

pub fn voice_not_found<S: Into<String>>( voice_id: S, available: Vec<String>, ) -> Self

Create a voice not found error

Source

pub fn invalid_parameter<S: Into<String>>(parameter: S, message: S) -> Self

Create an invalid parameter error

Source

pub fn emotion_error<S: Into<String>>(message: S) -> Self

Create an emotion control error

Source

pub fn cloning_error<S: Into<String>>(message: S) -> Self

Create a voice cloning error

Source

pub fn conversion_error<S: Into<String>>(message: S) -> Self

Create a voice conversion error

Source

pub fn singing_error<S: Into<String>>(message: S) -> Self

Create a singing synthesis error

Source

pub fn spatial_error<S: Into<String>>(message: S) -> Self

Create a spatial audio error

Source

pub fn model_loading_error<S: Into<String>>(message: S) -> Self

Create a model loading error

Source

pub fn feature_not_available<S: Into<String>>(message: S) -> Self

Create a feature not available error

Source

pub fn missing_dependency<S: Into<String>>(message: S) -> Self

Create a missing dependency error

Source

pub fn hardware_requirement<S: Into<String>>(message: S) -> Self

Create a hardware requirement error

Source

pub fn network_error<S: Into<String>>(message: S) -> Self

Create a network error

Source

pub fn performance_warning<S: Into<String>>(message: S) -> Self

Create a performance warning

Source

pub fn to_advanced_error(&self) -> AdvancedError

Convert to an advanced error with additional context

Source

pub fn user_message(&self) -> String

Get user-friendly error message with suggestions

Source

pub fn exit_code(&self) -> i32

Get exit code for this error

Trait Implementations§

Source§

impl Debug for CliError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CliError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CliError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Box<AdvancedError>> for CliError

Source§

fn from(source: Box<AdvancedError>) -> Self

Converts to this type from the input type.
Source§

impl From<CliError> for VoirsError

Convert CliError to VoirsError for compatibility

Source§

fn from(err: CliError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CliError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CliError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CliError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<VoirsError> for CliError

Source§

fn from(source: VoirsError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToLine for T
where T: Display,

Source§

fn to_line(&self) -> Line<'_>

Converts the value to a Line.
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T> ToSpan for T
where T: Display,

Source§

fn to_span(&self) -> Span<'_>

Converts the value to a Span.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T> ToText for T
where T: Display,

Source§

fn to_text(&self) -> Text<'_>

Converts the value to a Text.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,