pub enum MediaError {
InvalidModelId(String),
InvalidProducer {
field: &'static str,
reason: String,
},
NoProducer {
kind: &'static str,
feature: &'static str,
},
ModelMissing {
model: String,
},
Corrupt(String),
}Expand description
Errors raised when constructing or building generated media content.
Variants§
InvalidModelId(String)
A model id was empty, over-long, or contained a character outside
lowercase [a-z0-9._-].
InvalidProducer
A producer field that must be present was empty, or a prompt was longer
than MAX_PROMPT. The message names the field.
NoProducer
media build was asked for a modality this binary cannot produce.
Names the feature that would provide it, because the fix is a rebuild.
Fields
ModelMissing
The feature is compiled in but the model is not on disk. Names the exact command that installs it, rather than degrading to silence.
Corrupt(String)
A stored row could not be interpreted (database corruption).
Trait Implementations§
Source§impl Clone for MediaError
impl Clone for MediaError
Source§fn clone(&self) -> MediaError
fn clone(&self) -> MediaError
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 moreSource§impl Debug for MediaError
impl Debug for MediaError
Source§impl Display for MediaError
impl Display for MediaError
impl Eq for MediaError
Source§impl Error for MediaError
impl Error for MediaError
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 PartialEq for MediaError
impl PartialEq for MediaError
impl StructuralPartialEq for MediaError
Auto Trait Implementations§
impl Freeze for MediaError
impl RefUnwindSafe for MediaError
impl Send for MediaError
impl Sync for MediaError
impl Unpin for MediaError
impl UnsafeUnpin for MediaError
impl UnwindSafe for MediaError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.