Enum AttributeContentError
pub enum AttributeContentError<'a> {
Other(&'static str),
BothEitherFailed {
first_err: Box<AttributeContentError<'a>>,
second_err: Box<AttributeContentError<'a>>,
},
ExpectedArray {
value: &'a Value,
specified_length: Option<usize>,
},
InvalidOptionForDropdown {
invalid: String,
hint_list: &'static str,
},
ExternalDropdownMenuReferenceNotString(&'a Value),
Subblock(Box<JsonCtx<'a, BlockKindError<'a>>>),
}Expand description
Inner error indicating an attribute’s content is invalid.
This is typically wrapped by AttributeParseError and focuses
on errors of the type-specific format, when shadow information is
already resolved.
Variants§
Other(&'static str)
BothEitherFailed
Some attributes can be one of multiple types. This is represented with either::Either.
If the Left variant fails to parse, Right is tried with the same input.
If both fail the errors are returned.
ExpectedArray
InvalidOptionForDropdown
The found value is invalid, some attribute types provide a list with valid alternatives/hints.
ExternalDropdownMenuReferenceNotString(&'a Value)
Subblock(Box<JsonCtx<'a, BlockKindError<'a>>>)
Some attributes don’t contain the real data but only a reference to another block. This variant means that such a block occured and wasn’t totally valid.
Trait Implementations§
§impl<'a> Clone for AttributeContentError<'a>
impl<'a> Clone for AttributeContentError<'a>
§fn clone(&self) -> AttributeContentError<'a>
fn clone(&self) -> AttributeContentError<'a>
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 more§impl<'a> Debug for AttributeContentError<'a>
impl<'a> Debug for AttributeContentError<'a>
§impl<'a> Display for AttributeContentError<'a>
impl<'a> Display for AttributeContentError<'a>
§impl<'a> Error for AttributeContentError<'a>
impl<'a> Error for AttributeContentError<'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()
§impl<'a> PartialEq for AttributeContentError<'a>
impl<'a> PartialEq for AttributeContentError<'a>
impl<'a> StructuralPartialEq for AttributeContentError<'a>
Auto Trait Implementations§
impl<'a> !Send for AttributeContentError<'a>
impl<'a> !Sync for AttributeContentError<'a>
impl<'a> Freeze for AttributeContentError<'a>
impl<'a> RefUnwindSafe for AttributeContentError<'a>
impl<'a> Unpin for AttributeContentError<'a>
impl<'a> UnsafeUnpin for AttributeContentError<'a>
impl<'a> UnwindSafe for AttributeContentError<'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> 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> ⓘ
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