pub struct AmbiguousElement {
pub name: ElementName,
pub owners: Vec<FeatureName>,
}Expand description
The error of looking up an element value by a type name that several registered element values share.
A type name identifies an element type, and one type may have several
element values (every heading level is an element value of type
flm.heading), so a type name alone does not always say which element
value is meant. The type names that must be looked up this way, those of
synthesized elements and of presentation elements, must each belong to
exactly one element value; this error reports a type name that does not,
instead of taking the first match.
Two lookups return it: the registry’s lookup by type name, and
the element resolver that reading a stored tree back uses to find a node’s
element from its type name (crate::dump). It is defined in this module,
below both, so that they share one type.
Fields§
§name: ElementNameThe type name that several element values share.
owners: Vec<FeatureName>The feature that registered each element value of that type name, in
the order the lookup holds them: one entry per element value, so a
feature that registered two of them appears twice. The element resolver
of crate::dump, which has no record of which feature registered each
element value, gives
HOST_FEATURE for each one
instead.
Trait Implementations§
Source§impl Clone for AmbiguousElement
impl Clone for AmbiguousElement
Source§impl Debug for AmbiguousElement
impl Debug for AmbiguousElement
Source§impl Display for AmbiguousElement
impl Display for AmbiguousElement
impl Eq for AmbiguousElement
Source§impl Error for AmbiguousElement
impl Error for AmbiguousElement
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
use the Display impl or to_string()
Source§impl PartialEq for AmbiguousElement
impl PartialEq for AmbiguousElement
impl StructuralPartialEq for AmbiguousElement
Auto Trait Implementations§
impl Forget for AmbiguousElement
impl Freeze for AmbiguousElement
impl Move for AmbiguousElement
impl RefUnwindSafe for AmbiguousElement
impl Send for AmbiguousElement
impl Sync for AmbiguousElement
impl Unpin for AmbiguousElement
impl UnsafeUnpin for AmbiguousElement
impl UnwindSafe for AmbiguousElement
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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