Struct cl_generic_vec::iter::Cursor[][src]

pub struct Cursor<'a, S: ?Sized + Storage> { /* fields omitted */ }
Expand description

This struct is created by GenericVec::cursor. See its documentation for more.

Implementations

Get a mutable reference to the underlying RawCursor

Updating the state of the underlying RawCursor does update the state of this Cursor

The number of remaining elements in range of this Cursor

The Cursor is empty when there are 0 remaining elements

Returns true if the Cursor is empty

Returns true if the Cursor is has no unfilled slots and the Cursor is empty

Returns true if there is an unfilled slot at the front of the Cursor

Returns true if there is an unfilled slot at the back of the Cursor

Returns the number of unfilled slots if the Cursor is empty if the Cursor is not empty, the behavior is unspecified

Returns the number of unfilled slots at the front of the Cursor

Returns the number of unfilled slots at the back of the Cursor

Returns a reference to the next element of the Cursor. Returns None if the Cursor is empty

Note: this does not advance the Cursor or change the number of unfilled slots

Returns a mutable reference to the next element of the Cursor. Returns None if the Cursor is empty

Note: this does not advance the Cursor or change the number of unfilled slots

Returns a reference to the last element of the Cursor. Returns None if the Cursor is empty

Note: this does not advance the Cursor or change the number of unfilled slots

Returns a mutable reference to the last element of the Cursor. Returns None if the Cursor is empty

Note: this does not advance the Cursor or change the number of unfilled slots

Removes the next element of the Cursor and removes it from the underlying GenericVec

Advances the Cursor by 1 element

Creates 1 unfilled slot at the front of the Cursor.

Panics

Panics if the Cursor is empty

Removes the last element of the Cursor and removes it from the underlying GenericVec

Advances the Cursor by 1 element

Creates 1 unfilled slot at the back of the Cursor.

Panics

Panics if the Cursor is empty

Drops the next element of the Cursor and removes them it the underlying GenericVec

Advances the Cursor by 1 element

Creates 1 unfilled slot at the front of the Cursor.

Panics

Panics if the Cursor is empty

Drops the last element of the Cursor and removes them it the underlying GenericVec

Advances the Cursor by 1 element

Creates 1 unfilled slot at the back of the Cursor.

Panics

Panics if the Cursor is empty

Drops the next n elements of the Cursor and removes them from the underlying GenericVec

Advances the Cursor by n elements

Creates n unfilled slots at the front of the Cursor.

Panics

Panics if the Cursor’s length is less than n

Drops the last n elements of the Cursor and removes them from the underlying GenericVec

Advances the Cursor by n elements

Creates n unfilled slots at the back of the Cursor.

Panics

Panics if the Cursor’s length is less than n

Returns Ok(()) and writes value into the unfilled slot at the front of the Cursor if there is an unfilled slot at the front of the Cursor

If there are no unfilled slots at the front of the Cursor then return Err(value)

Fills in 1 unfilled slot at the front of the Cursor on success

Writes value into the unfilled slot at the front of the Cursor if there is an unfilled slot at the front of the Cursor

Fills in 1 unfilled slot at the front of the Cursor

Panics

Panics if there are no unfilled slots at the front of the Cursor

Returns Ok(()) and writes value into the unfilled slot at the back of the Cursor if there is an unfilled slot at the back of the Cursor

If there are no unfilled slots at the back of the Cursor then return Err(value)

Fills in 1 unfilled slot at the back of the Cursor on success

Writes value into the unfilled slot at the back of the Cursor if there is an unfilled slot at the back of the Cursor

Fills in 1 unfilled slot at the back of the Cursor

Panics

Panics if there are no unfilled slots at the back of the Cursor

Copies slice into the unfilled slots at the front of the Cursor if there are slice.len() unfilled slots at the front of the Cursor

Fills in slice.len() unfilled slots at the front of the Cursor

Panics

Panics if there are less than slice.len() unfilled slots at the front of the Cursor

Copies slice into the unfilled slots at the back of the Cursor if there are slice.len() unfilled slots at the back of the Cursor

Fills in slice.len() unfilled slots at the back of the Cursor

Panics

Panics if there are less than slice.len() unfilled slots at the back of the Cursor

Skips the next element of the Cursor and keeps it in the underlying GenericVec

Advances the Cursor by 1 element

Does not change the number of unfilled slots.

Panics

Panics if the Cursor is empty

Skips the last element of the Cursor and keeps it in the underlying GenericVec

Advances the Cursor by 1 element

Does not change the number of unfilled slots.

Panics

Panics if the Cursor is empty

Skips the next n elements of the Cursor and keeps them in the underlying GenericVec

Advances the Cursor by n elements

Does not change the number of unfilled slots.

Panics

Panics if the Cursor’s length is less than n

Skips the last n elements of the Cursor and keeps them in the underlying GenericVec

Advances the Cursor by n elements

Does not change the number of unfilled slots.

Panics

Panics if the Cursor’s length is less than n

Reserve at least space unfilled slots in the Cursor

Panics
  • Panics if the Cursor is not empty
  • May panic if the underlying GenericVec cannot reserve more space

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

Performs the conversion.

Performs the conversion.

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.