pub struct Queue<T> { /* private fields */ }
Expand description
push a value to the back of queue
pop from the queue, if it’s empty return None
pop from the queue, if it’s empty return None
get the size of queue
this function is unsafe because it’s possible that the block is destroyed
and the rare cases that the pop index is bigger than the push index may cause
return a wrong length
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read more
Executes the destructor for this type.
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.