Struct opencv::core::Vector [−][src]
pub struct Vector<T: VectorElement> where
Self: VectorExtern<T>, { /* fields omitted */ }
Expand description
Wrapper for C++ std::vector
Implementations
Create a Vector with pre-defined capacity
Create a Vector from iterator
Free extra capacity
Swap 2 elements in the Vector
Insert a new element at the specified index
Set element at the specified index
Same as set()
but without bounds checking
Safety
Caller must ensure that the specified index
is within the Vector
bounds
Same as get()
but without bounds checking
Safety
Caller must ensure that the specified index
is within the Vector
bounds
pub fn iter(&self) -> VectorRefIterator<'_, T>ⓘNotable traits for VectorRefIterator<'_, T>impl<T: VectorElement> Iterator for VectorRefIterator<'_, T> where
Vector<T>: VectorExtern<T>, type Item = T;
impl<T: VectorElement> Iterator for VectorRefIterator<'_, T> where
Vector<T>: VectorExtern<T>, type Item = T;
Return slice to the elements of the array.
This method is only available for OpenCV types that are Copy, with the exception of bool because bool is handled in a special way on the C++ side.
Return mutable slice to the elements of the array.
This method is only available for OpenCV types that are Copy, with the exception of bool because bool is handled in a special way on the C++ side.
Trait Implementations
impl<'a, T: VectorElement> Extend<<T as OpenCVType<'a>>::Arg> for Vector<T> where
Self: VectorExtern<T>,
impl<'a, T: VectorElement> Extend<<T as OpenCVType<'a>>::Arg> for Vector<T> where
Self: VectorExtern<T>,
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl<'a, T: VectorElement> FromIterator<<T as OpenCVType<'a>>::Arg> for Vector<T> where
Self: VectorExtern<T>,
impl<'a, T: VectorElement> FromIterator<<T as OpenCVType<'a>>::Arg> for Vector<T> where
Self: VectorExtern<T>,
Creates a value from an iterator. Read more
type Item = T
type Item = T
The type of the elements being iterated over.
type IntoIter = VectorIterator<T>
type IntoIter = VectorIterator<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> VectorIterator<T>ⓘNotable traits for VectorIterator<T>impl<T: VectorElement> Iterator for VectorIterator<T> where
Vector<T>: VectorExtern<T>, type Item = T;
fn into_iter(self) -> VectorIterator<T>ⓘNotable traits for VectorIterator<T>impl<T: VectorElement> Iterator for VectorIterator<T> where
Vector<T>: VectorExtern<T>, type Item = T;
impl<T: VectorElement> Iterator for VectorIterator<T> where
Vector<T>: VectorExtern<T>, type Item = T;
Creates an iterator from a value. Read more
type Item = T
type Item = T
The type of the elements being iterated over.
type IntoIter = VectorRefIterator<'v, T>
type IntoIter = VectorRefIterator<'v, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> VectorRefIterator<'v, T>ⓘNotable traits for VectorRefIterator<'_, T>impl<T: VectorElement> Iterator for VectorRefIterator<'_, T> where
Vector<T>: VectorExtern<T>, type Item = T;
fn into_iter(self) -> VectorRefIterator<'v, T>ⓘNotable traits for VectorRefIterator<'_, T>impl<T: VectorElement> Iterator for VectorRefIterator<'_, T> where
Vector<T>: VectorExtern<T>, type Item = T;
impl<T: VectorElement> Iterator for VectorRefIterator<'_, T> where
Vector<T>: VectorExtern<T>, type Item = T;
Creates an iterator from a value. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Vector<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Vector<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more