Struct openssl::stack::Stack
[−]
[src]
pub struct Stack<T: Stackable>(_);
An owned stack of T
.
Methods
impl<T: Stackable> Stack<T>
[src]
unsafe fn from_ptr(stack: *mut T::StackType) -> Stack<T>
Return a new Stack
Methods from Deref<Target=StackRef<T>>
fn len(&self) -> usize
Returns the number of items in the stack
fn iter(&self) -> Iter<T>
fn iter_mut(&mut self) -> IterMut<T>
fn get(&self, idx: usize) -> Option<&T::Ref>
Returns a reference to the element at the given index in the
stack or None
if the index is out of bounds
fn get_mut(&mut self, idx: usize) -> Option<&mut T::Ref>
Returns a mutable reference to the element at the given index in the
stack or None
if the index is out of bounds
fn pop(&mut self) -> Option<T>
Removes the last element from the stack and returns it.
Trait Implementations
impl<T: Stackable> Drop for Stack<T>
[src]
impl<T: Stackable> IntoIterator for Stack<T>
[src]
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
type Item = T
The type of the elements being iterated over.
fn into_iter(self) -> IntoIter<T>
Creates an iterator from a value. Read more
impl<T: Stackable> AsRef<StackRef<T>> for Stack<T>
[src]
impl<T: Stackable> Borrow<StackRef<T>> for Stack<T>
[src]
impl<T: Stackable> OpenSslType for Stack<T>
[src]
type CType = T::StackType
The raw C type.
type Ref = StackRef<T>
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut T::StackType) -> Stack<T>
Constructs an instance of this type from its raw type.
impl<T: Stackable> Deref for Stack<T>
[src]
type Target = StackRef<T>
The resulting type after dereferencing
fn deref(&self) -> &StackRef<T>
The method called to dereference a value
impl<T: Stackable> DerefMut for Stack<T>
[src]
impl<'a, T: Stackable> IntoIterator for &'a Stack<T>
[src]
type Item = &'a T::Ref
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Iter<'a, T>
Creates an iterator from a value. Read more