#[non_exhaustive]pub enum FlattenError {
TemplateIdOverflow,
DetectorBundle(DetectorBundleError),
Circuit(CircuitError),
UnresolvedLoopState(LoopStateId),
UnknownTemplate(TemplateId),
}Expand description
Why a template or program could not be flattened. The target is left unmodified on any of these.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TemplateIdOverflow
Appending flattened templates exhausted their u32 pool ids.
DetectorBundle(DetectorBundleError)
A detector bundle use or definition is malformed.
Circuit(CircuitError)
Unrolling the circuit itself failed (dangling/self-recursive body, measurement-id space overflow, or a resource allowance).
UnresolvedLoopState(LoopStateId)
A parity references a loop state no reachable repeat body defines before the reference resolves.
UnknownTemplate(TemplateId)
An instance references a template missing from the pool.
Implementations§
Source§impl FlattenError
impl FlattenError
Sourcepub fn is_resource_limited(&self) -> bool
pub fn is_resource_limited(&self) -> bool
Whether materialization exceeded an allowance rather than failing a circuit or loop-state check.
Trait Implementations§
Source§impl Clone for FlattenError
impl Clone for FlattenError
Source§fn clone(&self) -> FlattenError
fn clone(&self) -> FlattenError
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 FlattenError
impl Debug for FlattenError
Source§impl Display for FlattenError
impl Display for FlattenError
impl Eq for FlattenError
Source§impl Error for FlattenError
impl Error for FlattenError
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 From<CircuitError> for FlattenError
impl From<CircuitError> for FlattenError
Source§fn from(source: CircuitError) -> Self
fn from(source: CircuitError) -> Self
Converts to this type from the input type.
Source§impl From<DetectorBundleError> for FlattenError
impl From<DetectorBundleError> for FlattenError
Source§fn from(source: DetectorBundleError) -> Self
fn from(source: DetectorBundleError) -> Self
Converts to this type from the input type.
Source§impl From<FlattenError> for ProgramSliceError
impl From<FlattenError> for ProgramSliceError
Source§fn from(source: FlattenError) -> Self
fn from(source: FlattenError) -> Self
Converts to this type from the input type.
Source§impl From<FlattenError> for NodeTemplateInstanceMergeError
impl From<FlattenError> for NodeTemplateInstanceMergeError
Source§fn from(source: FlattenError) -> Self
fn from(source: FlattenError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FlattenError
impl PartialEq for FlattenError
impl StructuralPartialEq for FlattenError
Auto Trait Implementations§
impl Freeze for FlattenError
impl RefUnwindSafe for FlattenError
impl Send for FlattenError
impl Sync for FlattenError
impl Unpin for FlattenError
impl UnsafeUnpin for FlattenError
impl UnwindSafe for FlattenError
Blanket Implementations§
§impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
fn assign_index(&mut self, index: usize, to: bool)
fn negate_index(&mut self, index: usize)
fn clear_bits(&mut self)
fn assign_random(
&mut self,
bit_count: usize,
random_number_generator: &mut impl RngExt,
)where
BorrowedSelf: BitLength,
§impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
fn assign(&mut self, other: &Other)
fn bitxor_assign(&mut self, other: &Other)
fn bitand_assign(&mut self, other: &Other)
fn bitor_assign(&mut self, other: &Other)
§impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
§impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
fn index(&self, index: usize) -> bool
fn weight(&self) -> usize
fn parity(&self) -> bool
fn is_zero(&self) -> bool
fn is_unit(&self, index: usize) -> bool
fn support<'a>(&'a self) -> impl SortedIteratorwhere
BorrowedSelf: 'a,
fn max_support(&self) -> Option<usize>
fn min_support(&self) -> Option<usize>
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.