pub struct ValueAndSpan {
pub inner: SpannedValue,
pub span: Span,
}Expand description
A wrapper type around SpannedValue and Span, representing some EDN value
and the parsing offset (start, end) in the original EDN string.
Fields§
§inner: SpannedValue§span: SpanImplementations§
Source§impl ValueAndSpan
impl ValueAndSpan
pub fn new<I>(spanned_value: SpannedValue, span: I) -> ValueAndSpan
pub fn into_atom(self) -> Option<ValueAndSpan>
pub fn is_atom(&self) -> bool
pub fn as_atom(&self) -> Option<&ValueAndSpan>
pub fn into_text(self) -> Option<String>
pub fn as_text(&self) -> Option<&String>
Source§impl ValueAndSpan
impl ValueAndSpan
pub fn without_spans(self) -> Value
Trait Implementations§
Source§impl Clone for ValueAndSpan
impl Clone for ValueAndSpan
Source§impl Debug for ValueAndSpan
impl Debug for ValueAndSpan
Source§impl Display for ValueAndSpan
impl Display for ValueAndSpan
impl Eq for ValueAndSpan
Source§impl From<ValueAndSpan> for Value
impl From<ValueAndSpan> for Value
Source§fn from(src: ValueAndSpan) -> Value
fn from(src: ValueAndSpan) -> Value
Converts to this type from the input type.
Source§impl Hash for ValueAndSpan
impl Hash for ValueAndSpan
Source§impl Ord for ValueAndSpan
impl Ord for ValueAndSpan
Source§fn cmp(&self, other: &ValueAndSpan) -> Ordering
fn cmp(&self, other: &ValueAndSpan) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ValueAndSpan
impl PartialEq for ValueAndSpan
Source§impl PartialOrd for ValueAndSpan
impl PartialOrd for ValueAndSpan
impl StructuralPartialEq for ValueAndSpan
impl TransactableValueMarker for ValueAndSpan
ValueAndSpan is the value type coming out of the entity parser.
Auto Trait Implementations§
impl !Freeze for ValueAndSpan
impl RefUnwindSafe for ValueAndSpan
impl Send for ValueAndSpan
impl Sync for ValueAndSpan
impl Unpin for ValueAndSpan
impl UnsafeUnpin for ValueAndSpan
impl UnwindSafe for ValueAndSpan
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