pub enum Statement<'i> {
    Directive {
        name: Identifier<'i>,
        value: Option<Expression<'i>>,
    },
    Constant {
        ty: PrimitiveType,
        name: Identifier<'i>,
        value: Expression<'i>,
    },
    Field {
        ty: Type<'i>,
        name: Identifier<'i>,
        span: Span<'i>,
    },
    PaddingField {
        bits: u8,
        span: Span<'i>,
    },
    ServiceResponseMarker(Span<'i>),
}
Expand description

A statement in a DSDL file

Variants

Directive

Fields

name: Identifier<'i>
value: Option<Expression<'i>>

A directive, like @assert

Constant

Fields

name: Identifier<'i>
value: Expression<'i>

A constant, like uint8 THINGY = 9

Field

Fields

ty: Type<'i>
name: Identifier<'i>
span: Span<'i>

A field, like uint16 value

PaddingField

Fields

bits: u8
span: Span<'i>

A void padding field, like void6

ServiceResponseMarker(Span<'i>)

The --- marker that separates the request and response fields in a service type

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.