pub struct Marked<T> { /* private fields */ }
Expand description
A value marked with its source location.
This wrapper is used when data needs to be resolved after parsing has finished. In this case, we need information about the source location to be able to produce meaningful error messages.
Implementations
sourceimpl<T> Marked<T>
impl<T> Marked<T>
sourcepub fn resolve_config(&mut self, config: &ConfigFile)
pub fn resolve_config(&mut self, config: &ConfigFile)
Resolves the position for the given config file.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Converts the marked value into is unmarked value.
sourcepub fn mark<U>(&self, value: U) -> Marked<U>
pub fn mark<U>(&self, value: U) -> Marked<U>
Marks some other value with this value’s position.
sourcepub fn format_mark(&self, f: &mut Formatter<'_>) -> Result
pub fn format_mark(&self, f: &mut Formatter<'_>) -> Result
Formats the mark for displaying.
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for Marked<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Marked<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T: Error> Error for Marked<T>
impl<T: Error> Error for Marked<T>
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl<T> RefUnwindSafe for Marked<T> where
T: RefUnwindSafe,
impl<T> Send for Marked<T> where
T: Send,
impl<T> Sync for Marked<T> where
T: Sync,
impl<T> Unpin for Marked<T> where
T: Unpin,
impl<T> UnwindSafe for Marked<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
impl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
sourcefn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
The equivalent of Access::load
.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more