#[non_exhaustive]pub enum BlockGraphError {
Show 27 variants
BlockExists(IVec3),
BlockPositionOccupied(IVec3),
ModuleBlockOverlap {
position: IVec3,
first: Arc<MaterializedModuleSite>,
second: Arc<MaterializedModuleSite>,
},
BlockNotFound(IVec3),
InvalidTag {
tag: String,
},
PipeNotFound(IVec3, IVec3),
PipeExists(IVec3, IVec3),
CoordinateOverflow {
position: IVec3,
offset: IVec3,
},
CoordinateNormalizationOverflow {
min_z: i32,
max_z: i32,
},
CoordinateRotationOverflow {
position: IVec3,
axis: UDirection,
},
MeasurementEdgeMissingTimeBasis(IVec3, IVec3),
Invalid(InvalidBlockGraphError),
InvalidAction(InvalidActionError),
Io {
path: PathBuf,
source: Arc<Error>,
},
Block(BlockError),
Parse(ParseError),
ModuleSource(Arc<ModuleError>),
HierarchyRequiresFlatten {
operation: &'static str,
},
ModuleMaterialization(Arc<ModuleCertificationError>),
Zx(ZXError),
FillPorts(FillPortsError),
Stabilizer(StabilizerError),
GltfSerialize(Arc<Error>),
RotationUnsupportedDynamicBlocks,
RotationRequiresHalfTurns,
RotationWalkingRequiresTimeAxis,
RotationCubeHeightRequiresTimeAxis,
}Expand description
Errors from constructing, editing, parsing, validating, transforming, or
exporting a BlockGraph.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BlockExists(IVec3)
A block already occupies the requested anchor position.
BlockPositionOccupied(IVec3)
A block footprint overlaps an occupied lattice cell.
ModuleBlockOverlap
Two materialized module blocks overlap at one lattice cell.
Fields
position: IVec3Conflicting lattice cell.
BlockNotFound(IVec3)
No block occupies the requested position.
InvalidTag
A tag is empty or contains a forbidden character.
PipeNotFound(IVec3, IVec3)
No pipe connects the requested endpoints.
PipeExists(IVec3, IVec3)
A pipe already connects the requested endpoints.
CoordinateOverflow
Adding an offset to a lattice position overflowed.
CoordinateNormalizationOverflow
Normalizing the graph’s time span would overflow coordinates.
Fields
CoordinateRotationOverflow
Rotating a position would negate an unrepresentable coordinate.
Fields
position: IVec3Position that could not be rotated.
axis: UDirectionRotation axis whose component overflowed.
MeasurementEdgeMissingTimeBasis(IVec3, IVec3)
A measurement pipe has no inferable temporal basis.
Invalid(InvalidBlockGraphError)
The resulting block graph violates a graph invariant.
InvalidAction(InvalidActionError)
A classical action violates an action invariant.
Io
Reading or writing a graph file failed.
Block(BlockError)
A block kind or property is invalid.
Parse(ParseError)
Bloq graph text could not be parsed.
ModuleSource(Arc<ModuleError>)
Executable BLOG module declarations or imports are invalid.
HierarchyRequiresFlatten
A flat geometry operation was requested on authored module structure.
ModuleMaterialization(Arc<ModuleCertificationError>)
A BLOG module hierarchy could not be materialized as a graph.
Zx(ZXError)
ZX graph construction or analysis failed.
FillPorts(FillPortsError)
Open ports could not be filled consistently.
Stabilizer(StabilizerError)
Stabilizer construction or analysis failed.
GltfSerialize(Arc<Error>)
glTF JSON serialization failed.
RotationUnsupportedDynamicBlocks
Dynamic blocks support rotation only around the time axis.
RotationRequiresHalfTurns
Y blocks require rotations by an even number of quarter turns.
RotationWalkingRequiresTimeAxis
Walking and patch-rotation blocks support only time-axis rotation.
RotationCubeHeightRequiresTimeAxis
Non-default cube heights support only time-axis rotation.
Implementations§
Source§impl BlockGraphError
impl BlockGraphError
Sourcepub fn is_incomplete_action_program(&self) -> bool
pub fn is_incomplete_action_program(&self) -> bool
Whether this action error can be repaired by adding another action.
Trait Implementations§
Source§impl Clone for BlockGraphError
impl Clone for BlockGraphError
Source§fn clone(&self) -> BlockGraphError
fn clone(&self) -> BlockGraphError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockGraphError
impl Debug for BlockGraphError
Source§impl Display for BlockGraphError
impl Display for BlockGraphError
Source§impl Error for BlockGraphError
impl Error for BlockGraphError
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
use the Display impl or to_string()
Source§impl From<BlockError> for BlockGraphError
impl From<BlockError> for BlockGraphError
Source§fn from(source: BlockError) -> Self
fn from(source: BlockError) -> Self
Source§impl From<BlockGraphError> for VerifyLogicalError
impl From<BlockGraphError> for VerifyLogicalError
Source§fn from(source: BlockGraphError) -> Self
fn from(source: BlockGraphError) -> Self
Source§impl From<BlockGraphError> for FeedbackInferenceError
impl From<BlockGraphError> for FeedbackInferenceError
Source§fn from(source: BlockGraphError) -> Self
fn from(source: BlockGraphError) -> Self
Source§impl From<BooleanResourceError> for BlockGraphError
impl From<BooleanResourceError> for BlockGraphError
Source§fn from(error: BooleanResourceError) -> Self
fn from(error: BooleanResourceError) -> Self
Source§impl From<FillPortsError> for BlockGraphError
impl From<FillPortsError> for BlockGraphError
Source§fn from(source: FillPortsError) -> Self
fn from(source: FillPortsError) -> Self
Source§impl From<InvalidActionError> for BlockGraphError
impl From<InvalidActionError> for BlockGraphError
Source§fn from(source: InvalidActionError) -> Self
fn from(source: InvalidActionError) -> Self
Source§impl From<InvalidBlockGraphError> for BlockGraphError
impl From<InvalidBlockGraphError> for BlockGraphError
Source§fn from(source: InvalidBlockGraphError) -> Self
fn from(source: InvalidBlockGraphError) -> Self
Source§impl From<ParseError> for BlockGraphError
impl From<ParseError> for BlockGraphError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<StabilizerError> for BlockGraphError
impl From<StabilizerError> for BlockGraphError
Source§fn from(source: StabilizerError) -> Self
fn from(source: StabilizerError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for BlockGraphError
impl !UnwindSafe for BlockGraphError
impl Freeze for BlockGraphError
impl Send for BlockGraphError
impl Sync for BlockGraphError
impl Unpin for BlockGraphError
impl UnsafeUnpin for BlockGraphError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].