pub enum FeagiDataError {
DeserializationError(String),
SerializationError(String),
BadParameters(String),
NeuronError(String),
InternalError(String),
ConstError(&'static str),
NotImplemented,
}Expand description
Common error type for FEAGI data operations.
Provides structured error handling for serialization, deserialization, validation, and internal errors across the FEAGI data processing pipeline.
§Examples
use feagi_structures::FeagiDataError;
fn validate_count(count: u32) -> Result<(), FeagiDataError> {
if count == 0 {
return Err(FeagiDataError::BadParameters("Count must be > 0".into()));
}
Ok(())
}
assert!(validate_count(0).is_err());
assert!(validate_count(5).is_ok());Variants§
DeserializationError(String)
Failed to deserialize bytes into data structures
SerializationError(String)
Failed to serialize data structures into bytes
BadParameters(String)
Invalid parameters provided to a function
NeuronError(String)
Error related to neuron operations
InternalError(String)
Internal error indicating a bug (please report)
ConstError(&'static str)
failed to process something in a const function
NotImplemented
Feature not yet implemented
Trait Implementations§
Source§impl Debug for FeagiDataError
impl Debug for FeagiDataError
Source§impl Display for FeagiDataError
impl Display for FeagiDataError
Source§impl Error for FeagiDataError
impl Error for FeagiDataError
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()
Auto Trait Implementations§
impl Freeze for FeagiDataError
impl RefUnwindSafe for FeagiDataError
impl Send for FeagiDataError
impl Sync for FeagiDataError
impl Unpin for FeagiDataError
impl UnwindSafe for FeagiDataError
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> 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