Struct pretty_trait::Newline [] [src]

pub struct Newline;

An unconditional newline.

Always causes its environment to break.

Examples

Basic usage:

use pretty_trait::{JoinExt, Newline, to_string};

let expected = "\
hello
world";

assert_eq!(to_string(&"hello".join(Newline).join("world"), None, 4), expected);

Trait Implementations

impl Clone for Newline
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Newline
[src]

impl Debug for Newline
[src]

[src]

Formats the value using the given formatter. Read more

impl Pretty for Newline
[src]

[src]

Calculate the intrinsic size of this value, if it were to be displayed on a single line.

[src]

Render this value in a given context.

Auto Trait Implementations

impl Send for Newline

impl Sync for Newline