pub struct AsLemmaSource<'a, T: ?Sized>(pub &'a T);Expand description
Wrapper that selects the “emit valid Lemma source” Display implementation.
The regular Display on AST types is for human-readable output. Wrap a
reference in AsLemmaSource when you need syntactically valid Lemma that
can be parsed back (round-trip).
§Example
ⓘ
let s = format!("{}", AsLemmaSource(&fact_value));Tuple Fields§
§0: &'a TTrait Implementations§
Source§impl<'a> Display for AsLemmaSource<'a, CommandArg>
impl<'a> Display for AsLemmaSource<'a, CommandArg>
Source§impl<'a> Display for AsLemmaSource<'a, FactValue>
impl<'a> Display for AsLemmaSource<'a, FactValue>
Source§impl<'a> Display for AsLemmaSource<'a, MetaValue>
impl<'a> Display for AsLemmaSource<'a, MetaValue>
Source§impl<'a> Display for AsLemmaSource<'a, TypeDef>
impl<'a> Display for AsLemmaSource<'a, TypeDef>
Auto Trait Implementations§
impl<'a, T> Freeze for AsLemmaSource<'a, T>where
T: ?Sized,
impl<'a, T> RefUnwindSafe for AsLemmaSource<'a, T>where
T: RefUnwindSafe + ?Sized,
impl<'a, T> Send for AsLemmaSource<'a, T>
impl<'a, T> Sync for AsLemmaSource<'a, T>
impl<'a, T> Unpin for AsLemmaSource<'a, T>where
T: ?Sized,
impl<'a, T> UnsafeUnpin for AsLemmaSource<'a, T>where
T: ?Sized,
impl<'a, T> UnwindSafe for AsLemmaSource<'a, T>where
T: RefUnwindSafe + ?Sized,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.