pub enum GiveUp {
Stopped,
Refused {
limit: OperationError,
refused_bytes: Option<u64>,
},
OutOfMemory,
Invalid(String),
}Expand description
Why a compile has no diagram to return.
Variants§
Stopped
The compile stopped short at its deadline. A caller with a fallback
runs it; nothing partial is ever returned, so a count taken from a
compile that did not give up is exact. The library’s
OperationError::Stopped is the same stop, one level down.
Refused
The compile stopped short because an apply was refused under the batch
limits: limit is OverBudget (memory) or OutputCap (size), and
refused_bytes the request the allocator refused, when it was one. A
caller treats it as GiveUp::Stopped.
Fields
limit: OperationErrorThe limit the apply reached.
OutOfMemory
An allocation was refused while reducing the finished diagram. The
binary reports it with the diagnostic crate::Error carries, which is
what a benchmark harness reads to classify the run as out of memory.
Invalid(String)
The caller’s input does not fit together: the vtree does not place
exactly the formula’s variables, a ComponentPlan::Split does not
partition the formula, or the output’s variables or weights do not
cover the requested formula. The text says which.
Trait Implementations§
Source§impl Error for GiveUp
impl Error for GiveUp
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<GiveUp> for Error
A give-up as the run reports it: a stop or a refusal ends the run without
a count, and inputs that do not fit fail the compile stage.
impl From<GiveUp> for Error
A give-up as the run reports it: a stop or a refusal ends the run without a count, and inputs that do not fit fail the compile stage.