[−][src]Struct libslide::Stmt
A statement in a slide program.
Fields
kind: StmtKindThe kind of the statement.
vw: usizeVertical 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]
self,
expr_update: impl FnOnce(RcExpr) -> RcExpr,
asgn_update: impl FnOnce(Assignment) -> Assignment
) -> Self
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]
fn emit_pretty(&self, config: EmitConfig) -> String[src]
fn emit_s_expression(&self, config: EmitConfig) -> String[src]
fn emit_latex(&self, config: EmitConfig) -> String[src]
fn emit(&self, form: EmitFormat, config: EmitConfig) -> String[src]
fn emit_debug(&self, _config: EmitConfig) -> String[src]
fn emit_wrapped_latex(&self, config: EmitConfig) -> String[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,