pub struct Arena<'a, A = ()> { /* private fields */ }
Expand description

An arena which can be used to allocate Doc values.

Implementations

Trait Implementations

Returns the “default value” for a type. Read more

Allocate an empty document.

Fails document rendering immediately. Read more

Allocate a single hardline.

A line acts like a \n but behaves like space if it is grouped on a single line.

Acts like line but behaves like nil if grouped on a single line Read more

A softline acts like space if the document fits the page, otherwise like line

A softline_ acts like nil if the document fits the page, otherwise like line_

Allocate a document containing the text t.to_string(). Read more

Allocate a document containing the given text. Read more

Allocate a document concatenating the given documents.

Allocate a document that intersperses the given separator S between the given documents [A, B, C, ..., Z], yielding [A, S, B, S, C, S, ..., S, Z]. Read more

Allocate a document that acts differently based on the position and page layout Read more

Allocate a document that acts differently based on the current nesting level Read more

Reflows text inserting softline in place of any whitespace

Converts self into a document

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.