Trait hyper_ast::types::Children

source ·
pub trait Children<IdX, T>: Index<IdX, Output = T> + IterableChildren<T> {
    // Required methods
    fn child_count(&self) -> IdX;
    fn get(&self, i: IdX) -> Option<&T>;
    fn rev(&self, i: IdX) -> Option<&T>;
    fn after(&self, i: IdX) -> &Self;
    fn before(&self, i: IdX) -> &Self;
    fn between(&self, start: IdX, end: IdX) -> &Self;
    fn inclusive(&self, start: IdX, end: IdX) -> &Self;
}

Required Methods§

source

fn child_count(&self) -> IdX

source

fn get(&self, i: IdX) -> Option<&T>

source

fn rev(&self, i: IdX) -> Option<&T>

source

fn after(&self, i: IdX) -> &Self

source

fn before(&self, i: IdX) -> &Self

source

fn between(&self, start: IdX, end: IdX) -> &Self

source

fn inclusive(&self, start: IdX, end: IdX) -> &Self

Implementations on Foreign Types§

source§

impl<IdX, T> Children<IdX, T> for [T]where IdX: SliceIndex<[T], Output = T> + NumCast,

source§

fn child_count(&self) -> IdX

source§

fn get(&self, i: IdX) -> Option<&T>

source§

fn rev(&self, idx: IdX) -> Option<&T>

source§

fn after(&self, i: IdX) -> &Self

source§

fn before(&self, i: IdX) -> &Self

source§

fn between(&self, start: IdX, end: IdX) -> &Self

source§

fn inclusive(&self, start: IdX, end: IdX) -> &Self

Implementors§

source§

impl<T> Children<u8, T> for MySlice<T>

source§

impl<T> Children<u16, T> for MySlice<T>