Struct libosmium::ItemBuffer

source ·
pub struct ItemBuffer { /* private fields */ }
Expand description

Buffer to clone OSM items into

Implementations§

Construct a new, empty buffer.

Constructs a new, empty buffer with at least the specified capacity.

Note the capacity is in bytes not number of items, since they are all dynamically sized.

Appends an item to the back of the buffer.

Returns an iterator over the buffer.

The iterator yields all items from start to end.

Check whether an item fits into the buffer’s remaining space without reallocating.

Return true if the buffer contains no items.

Clears the whole buffer, removing all items.

Note that this method has no effect on the allocated capacity of the vector.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Print a list of the contained items’ types

Returns the “default value” for a type. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.