Struct obstack::Obstack [] [src]

pub struct Obstack<A = usize> { /* fields omitted */ }

An obstack

Methods

impl<A> Obstack<A>
[src]

[src]

Constructs a new Obstack with the specified initial capacity.

The obstack will be able to allocate at least initial_capacity bytes before having to allocate again.

[src]

Constructs a new Obstack.

The initial capacity will be set to DEFAULT_INITIAL_CAPACITY.

[src]

Pushes a value to the Obstack.

Returns a Ref that can be dereferenced to the value's location on the stack.

let r: Ref<String> = stack.push(String::from("Hello World!"));
assert_eq!(*r, "Hello World!");

[src]

Pushes a Copy value to the Obstack.

Returns a mutable reference to the value on the stack.

let r: &mut [u8; 5] = stack.push_copy([1,2,3,4,5]);
assert_eq!(*r, [1,2,3,4,5]);

Trait Implementations

impl<A: Debug> Debug for Obstack<A>
[src]

[src]

Formats the value using the given formatter.

impl Display for Obstack
[src]

[src]

Formats the value using the given formatter. Read more