pub struct Branch<D, E> {
pub data: D,
pub data_span: Range<usize>,
pub children: Vec<E>,
}
Expand description
Value of a branch node in the AST.
A branch node contains a property list and optionally a piece of data.
For example, CHARACTER
nodes specify a character in the data, and then
a property list of Character
nodes.
Fields§
§data: D
Data in this branch node.
data_span: Range<usize>
Span of the data in the property list source code.
children: Vec<E>
Elements of the property list.
Trait Implementations§
source§impl<'a, D, E> Arbitrary<'a> for Branch<D, E>where
D: Arbitrary<'a>,
E: Arbitrary<'a>,
impl<'a, D, E> Arbitrary<'a> for Branch<D, E>where D: Arbitrary<'a>, E: Arbitrary<'a>,
source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl<D: PartialEq, E: PartialEq> PartialEq<Branch<D, E>> for Branch<D, E>
impl<D: PartialEq, E: PartialEq> PartialEq<Branch<D, E>> for Branch<D, E>
impl<D: Eq, E: Eq> Eq for Branch<D, E>
impl<D, E> StructuralEq for Branch<D, E>
impl<D, E> StructuralPartialEq for Branch<D, E>
Auto Trait Implementations§
impl<D, E> RefUnwindSafe for Branch<D, E>where D: RefUnwindSafe, E: RefUnwindSafe,
impl<D, E> Send for Branch<D, E>where D: Send, E: Send,
impl<D, E> Sync for Branch<D, E>where D: Sync, E: Sync,
impl<D, E> Unpin for Branch<D, E>where D: Unpin, E: Unpin,
impl<D, E> UnwindSafe for Branch<D, E>where D: UnwindSafe, E: UnwindSafe,
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