pub struct Node<'e> {
pub kind: NodeKind<'e>,
pub span: Span,
pub leading_discards: Vec<Discard<'e>>,
}Expand description
Concrete EDN syntax tree.
Parse one with parse, then convert it to an Edn with Edn::try_from.
Fields§
§kind: NodeKind<'e>§span: Span§leading_discards: Vec<Discard<'e>>Implementations§
Trait Implementations§
impl<'e> Eq for Node<'e>
Source§impl<'e> Ord for Node<'e>
impl<'e> Ord for Node<'e>
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
Source§impl<'e> PartialOrd for Node<'e>
impl<'e> PartialOrd for Node<'e>
impl<'e> StructuralPartialEq for Node<'e>
Source§impl<'e> TryFrom<Node<'e>> for Edn<'e>
impl<'e> TryFrom<Node<'e>> for Edn<'e>
Source§fn try_from(_: Node<'e>) -> Result<Self>
fn try_from(_: Node<'e>) -> Result<Self>
Elaborates a concrete Node into an abstract resolved Edn
#[cfg(feature = "unstable")]
{
use clojure_reader::{parse, edn::Edn};
let edn: Edn = parse::Node::no_discards(parse::NodeKind::Nil, parse::Span::default())
.try_into()
.unwrap();
assert_eq!(edn, Edn::Nil);
}§Errors
See crate::error::Error.
Auto Trait Implementations§
impl<'e> Freeze for Node<'e>
impl<'e> RefUnwindSafe for Node<'e>
impl<'e> Send for Node<'e>
impl<'e> Sync for Node<'e>
impl<'e> Unpin for Node<'e>
impl<'e> UnsafeUnpin for Node<'e>
impl<'e> UnwindSafe for Node<'e>
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