pub enum Error {
RegionNotFound(String),
ValidationFailed(String),
TokenBudgetExceeded {
used: usize,
max: usize,
},
RegionFull {
region: String,
used: usize,
max: usize,
},
PinnedRegionsOverBudget {
pinned_tokens: usize,
total_budget: usize,
},
BlueprintInvalid(String),
LayoutInvalid(String),
TransformFailed(String),
SerializationError(Error),
Other(String),
}Expand description
Core error types for Leviath.
Variants§
RegionNotFound(String)
Region with the specified name was not found
ValidationFailed(String)
Region validation failed
TokenBudgetExceeded
Content exceeds region’s token budget
Fields
RegionFull
A region under admission = "reject" is full, and the write was
refused rather than something else being dropped to fit it.
Distinct from Error::TokenBudgetExceeded because the remedy is
different: that one says this single write is too big for the region,
this one says the region is full and the agent has to decide what it is
finished with.
Fields
PinnedRegionsOverBudget
Pinned regions alone exceed total token budget
Fields
BlueprintInvalid(String)
Blueprint validation failed
LayoutInvalid(String)
Layout validation failed
TransformFailed(String)
Context transform failed
SerializationError(Error)
Serialization error
Other(String)
Generic error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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