[][src]Struct libslide::grammar::statement::Stmt

pub struct Stmt {
    pub kind: StmtKind,
    vw: usize,
}

A statement in a slide program.

Fields

kind: StmtKind

The kind of the statement.

vw: usize

Vertical whitespace present before the statement.

Implementations

impl Stmt[src]

pub fn new(kind: StmtKind, vw: usize) -> Self[src]

Creates a new Stmt.

pub fn update_with(
    self,
    expr_update: impl FnOnce(RcExpr) -> RcExpr,
    asgn_update: impl FnOnce(Assignment) -> Assignment
) -> Self
[src]

Update self with a fresh statement kind, given functions for how a statement should be generated.

pub fn vw(&self) -> usize[src]

Retrieve the number of vertical whitespace lines above this statement.

pub fn span(&self) -> &Span[src]

Gets the span of the statement.

Trait Implementations

impl Clone for Stmt[src]

impl Debug for Stmt[src]

impl Display for Stmt[src]

impl Emit for Stmt[src]

impl Grammar for Stmt[src]

Auto Trait Implementations

impl RefUnwindSafe for Stmt

impl Send for Stmt

impl Sync for Stmt

impl Unpin for Stmt

impl UnwindSafe for Stmt

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> ToString for T where
    T: Display + ?Sized
[src]

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.