[][src]Struct mamba::parse::ast::AST

pub struct AST {
    pub pos: Position,
    pub node: Node,
}

Wrapper of Node, and its start end end position in the source code. The start and end positions can be used to generate useful error messages.

Fields

pos: Positionnode: Node

Methods

impl AST[src]

pub fn new(pos: &Position, node: Node) -> AST[src]

pub fn equal_structure(&self, other: &AST) -> bool[src]

Trait Implementations

impl Clone for AST[src]

impl Debug for AST[src]

impl Eq for AST[src]

impl Hash for AST[src]

impl PartialEq<AST> for AST[src]

impl StructuralEq for AST[src]

impl StructuralPartialEq for AST[src]

impl<'_> TryFrom<&'_ AST> for ClassArgument[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ AST> for GenericFunctionArg[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

fn try_from(ast: &AST) -> TypeResult<GenericFunctionArg>[src]

Construct FunctionArg from AST.

impl<'_> TryFrom<&'_ AST> for GenericClass[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ AST> for GenericField[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ AST> for GenericFields[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ AST> for GenericFunction[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

fn try_from(ast: &AST) -> TypeResult<GenericFunction>[src]

Build a function signature from a AST.

Failures

If AST's node is not the FunDef variant of the Node.

impl<'_> TryFrom<&'_ AST> for DirectName[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ AST> for Name[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

fn try_from(ast: &AST) -> TypeResult<Name>[src]

Try to construct Name from AST.

In the case of Generics, isa field is ignored and we only look at the name of the generic itself.

impl<'_> TryFrom<&'_ AST> for NameUnion[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ AST> for GenericParent[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for AST

impl Send for AST

impl Sync for AST

impl Unpin for AST

impl UnwindSafe for AST

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,