Struct jenga::Frame [] [src]

pub struct Frame<'a> { /* fields omitted */ }

An allocation Frame.

Data can be allocated using:

  • place which allocates b bytes of type T and returns a mutable view to it.
  • place_raw if you really want unsafe code.
  • place_iter will drain the given iterator and return a mutable view to the data.
  • cursor gives you a gowing buffer that supports io::Write.
  • writer does the same, but supports fmt::Write and is can be turned into &str

All returned buffers are valid for the lifetime of the Frame.

Methods

impl<'a> Frame<'a>
[src]

[src]

Turn a slice of memory into an allocator Frame.

[src]

Allocate count elements of T. Returns OutOfMemory if there is not enough space left.

[src]

allocate count elements of T. panics if there is not enough space left.

[src]

[src]

Allocate count elements of T. Returns OutOfMemory if there is not enough space left. The caller has to ensure the data does not outlife the Frame

[src]

Allocate count elements of T. panics if there is not enough space left. The caller has to ensure the data does not outlife the Frame

[src]

Drain the provided Iterator and return the resulting data. The iterator may not use the stack allocator. panics if the iterator attempts to use the stack allocator.

[src]

Create a subframe. All allocations that happen within it, will be reset when it goes out if scope.

Important traits for Cursor<'a, 'b>
[src]

Create a growing Buffer that supports io::Write call finish() on the buffer to complete it.

[src]

Create a growing Buffer that supports fmt::Write call finish() on the buffer to complete it.

Trait Implementations

Auto Trait Implementations

impl<'a> Send for Frame<'a>

impl<'a> Sync for Frame<'a>