Skip to main content

Blocks

Trait Blocks 

Source
pub trait Blocks {
    const INDENT: &'static str;

    // Required methods
    fn open(head: &str) -> String;
    fn close(tail: &str) -> String;
}
Expand description

How the language nests: its blocks and their indentation.

Required Associated Constants§

Source

const INDENT: &'static str

One level of indentation.

Required Methods§

Source

fn open(head: &str) -> String

The line opening a block after head.

Source

fn close(tail: &str) -> String

The line closing a block, then tail.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§