#[non_exhaustive]pub enum CVarError {
UnknownCVar,
BadCVarType,
MissingCid,
CannotDeserialize,
FailedDeserialize(String),
FailedApply {
inner: ApplyError,
},
AccessConflict,
TomlError(TomlError),
MalformedConfigDuringWrite(&'static str),
TomlSerError(Error),
}Expand description
Errors that can occur when manipulating CVars.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownCVar
Error indicating a CVar was never registered or is invalid.
BadCVarType
Error indicating the given CVar type is invalid.
MissingCid
Error indicating the CVar type is missing a ComponentId and is likely not registered correctly.
CannotDeserialize
Error indicating the underlying type of the CVar cannot be deserialized, and as such cannot be reflected over.
FailedDeserialize(String)
Error indicating the CVar failed to deserialize.
FailedApply
Error indicating applying a value to the CVar failed, containing the inner error.
Fields
inner: ApplyErrorThe inner error.
AccessConflict
Error indicating that the world could not fulfill the requested operation due to an access conflict with an ongoing operation.
TomlError(TomlError)
An error when parsing a TOML document.
MalformedConfigDuringWrite(&'static str)
An error when saving encounters malformed TOML structure.
TomlSerError(Error)
An error when serializing TOML data.
Trait Implementations§
Source§impl Error for CVarError
impl Error for CVarError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ApplyError> for CVarError
impl From<ApplyError> for CVarError
Source§fn from(value: ApplyError) -> Self
fn from(value: ApplyError) -> Self
Source§impl From<ResourceFetchError> for CVarError
impl From<ResourceFetchError> for CVarError
Source§fn from(value: ResourceFetchError) -> Self
fn from(value: ResourceFetchError) -> Self
Auto Trait Implementations§
impl Freeze for CVarError
impl RefUnwindSafe for CVarError
impl Send for CVarError
impl Sync for CVarError
impl Unpin for CVarError
impl UnwindSafe for CVarError
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> DowncastSend for T
impl<T> DowncastSend for T
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>
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>
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