pub enum BlockError<'a> {
MissingMandatoryAttr(&'static str),
AttrType {
attr_name: &'static str,
expected_type: &'static str,
},
Kind(BlockKindError<'a>),
}Expand description
Failed to parse BlockWrapper.
Variants§
MissingMandatoryAttr(&'static str)
A property of BlockWrapper that is not directly
related to the blocks kind is missing.
This includes “next”,
“parent”,
“shadow”, “topLevel”, “x” and “y”.
“x” and “y” are only present/needed if “topLevel” is true, see
top_level_pos
AttrType
A boolean attribute (“shadow”, “topLevel”) was not stored as json boolean or an integer attribute (“x”, “y”) was not stored as json integer
Kind(BlockKindError<'a>)
Some error occured that is directly related to the blocks kind, e. g. its opcode
Trait Implementations§
Source§impl<'a> Debug for BlockError<'a>
impl<'a> Debug for BlockError<'a>
Source§impl<'a> Display for BlockError<'a>
impl<'a> Display for BlockError<'a>
Source§impl<'a> Error for BlockError<'a>
impl<'a> Error for BlockError<'a>
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()
Source§impl<'a> PartialEq for BlockError<'a>
impl<'a> PartialEq for BlockError<'a>
impl<'a> StructuralPartialEq for BlockError<'a>
Auto Trait Implementations§
impl<'a> !Send for BlockError<'a>
impl<'a> !Sync for BlockError<'a>
impl<'a> Freeze for BlockError<'a>
impl<'a> RefUnwindSafe for BlockError<'a>
impl<'a> Unpin for BlockError<'a>
impl<'a> UnsafeUnpin for BlockError<'a>
impl<'a> UnwindSafe for BlockError<'a>
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