pub struct ErrorContext { /* private fields */ }Expand description
Context that is known at the actual point of a failure. Absent properties are not inferred from error message text.
Implementations§
Source§impl ErrorContext
impl ErrorContext
Sourcepub fn new() -> ErrorContext
pub fn new() -> ErrorContext
Empty context.
Sourcepub fn with_operation(self, value: OperationPhase) -> ErrorContext
pub fn with_operation(self, value: OperationPhase) -> ErrorContext
Attach a known operation phase.
Sourcepub fn with_panel(self, value: PanelPath) -> ErrorContext
pub fn with_panel(self, value: PanelPath) -> ErrorContext
Attach the actual selected panel address.
Sourcepub fn with_layer(self, value: LayerSlot) -> ErrorContext
pub fn with_layer(self, value: LayerSlot) -> ErrorContext
Attach the actual layer slot.
Sourcepub fn with_element(self, value: ElementRef) -> ErrorContext
pub fn with_element(self, value: ElementRef) -> ErrorContext
Attach the known owning element and its structural addresses.
Sourcepub fn with_role(self, value: DataRole) -> ErrorContext
pub fn with_role(self, value: DataRole) -> ErrorContext
Attach the actual scientific input role.
Sourcepub fn with_member(self, value: MemberAddress) -> ErrorContext
pub fn with_member(self, value: MemberAddress) -> ErrorContext
Attach an actual original member address.
Sourcepub fn with_binding(self, value: RawKey) -> ErrorContext
pub fn with_binding(self, value: RawKey) -> ErrorContext
Attach an original binding field key.
Sourcepub fn with_path(self, value: PathBuf) -> ErrorContext
pub fn with_path(self, value: PathBuf) -> ErrorContext
Attach an actual file path.
Sourcepub fn with_span(self, value: TextSpan) -> ErrorContext
pub fn with_span(self, value: TextSpan) -> ErrorContext
Attach a source-text span.
Sourcepub const fn operation(&self) -> Option<OperationPhase>
pub const fn operation(&self) -> Option<OperationPhase>
Actual operation phase, when known.
Sourcepub const fn element(&self) -> Option<&ElementRef>
pub const fn element(&self) -> Option<&ElementRef>
Actual owning element, when known.
Sourcepub const fn member(&self) -> Option<&MemberAddress>
pub const fn member(&self) -> Option<&MemberAddress>
Actual member address, when known.
Trait Implementations§
Source§impl Clone for ErrorContext
impl Clone for ErrorContext
Source§fn clone(&self) -> ErrorContext
fn clone(&self) -> ErrorContext
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 ErrorContext
impl Debug for ErrorContext
Source§impl Default for ErrorContext
impl Default for ErrorContext
Source§fn default() -> ErrorContext
fn default() -> ErrorContext
Returns the “default value” for a type. Read more
impl Eq for ErrorContext
Source§impl PartialEq for ErrorContext
impl PartialEq for ErrorContext
impl StructuralPartialEq for ErrorContext
Auto Trait Implementations§
impl Forget for ErrorContext
impl Freeze for ErrorContextwhere
*const u8 is !null: Freeze,
PhantomData<PanelStep>: Freeze,
*const ArcInner<()> is !null: Freeze,
PhantomData<ArcInner<()>>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<[u8]> is !null: Freeze,
PhantomData<ArcInner<[u8]>>: Freeze,
PhantomData<RawKey>: Freeze,
*const RawKey is !null: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
impl Move for ErrorContext
impl RefUnwindSafe for ErrorContext
impl Send for ErrorContext
impl Sync for ErrorContext
impl Unpin for ErrorContext
impl UnsafeUnpin for ErrorContextwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<PanelStep>: UnsafeUnpin,
*const ArcInner<()> is !null: UnsafeUnpin,
PhantomData<ArcInner<()>>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
PhantomData<RawKey>: UnsafeUnpin,
*const RawKey is !null: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for ErrorContextwhere
RawVecInner: UnwindSafe,
Arc<[u8]>: UnwindSafe,
BoxRaw<RawKey>: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<()>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.