[][src]Struct combu::vector::Vector

pub struct Vector<T>(pub Option<Vec<T>>);

struct Vector is a new type pattern of Option<Vec>

Implementations

impl<T> Vector<T>[src]

pub fn new() -> Self[src]

Creates a new Vector.

pub fn with_inner(inner_vec: Vec<T>) -> Self[src]

Creates a new Vetocr with inner.

pub fn init(&mut self, value: Option<Vec<T>>)[src]

Initialize this. After initialization, this inner Option<Vec> becomes value.

pub fn with_first_elem(elem: T) -> Self[src]

Creates a new Vector with first element.

pub fn push(&mut self, push: T)[src]

Pushes push:T to this.

pub fn len(&self) -> usize[src]

Returns this Vector.

pub fn append_vec(&mut self, other: Vec<T>)[src]

Append other(Vec) to this inner.

pub fn insert(&mut self, index: usize, insert: T)[src]

Insert T into this inner.

pub fn append(&mut self, other: Vector<T>)[src]

Appends other to this.

pub fn is_none(&self) -> bool[src]

Returns true if this inner is None.

pub fn has_inner_vec(&self) -> bool[src]

Returns true if ths has inner vec(as Some(Vec)).

pub fn set_none(&mut self)[src]

Sets None as inner.

pub fn clear(&mut self)[src]

Clears inner vec. If inner is None, does nothing.

pub fn inner(&self) -> Option<&Vec<T>>[src]

Gets inner.

pub fn inner_mut(&mut self) -> &mut Option<Vec<T>>[src]

Gets inner as mutable form.

pub fn take(&mut self) -> Vector<T>[src]

Takes inner and returns Vector that stores the inner.

pub fn inner_ref(self) -> Option<Vec<T>>[src]

Gets inner reference.

pub fn get(&self, index: usize) -> Option<&T>[src]

Returns a reference to an element has index(usize).

impl<T> Vector<Vector<T>>[src]

pub fn sum_of_length(&self) -> usize[src]

Returns the sum of inner Vectors' len.

pub fn length_of_last(&self) -> usize[src]

Returns the len fo last of inner Vectors.

Trait Implementations

impl<T: Clone> Clone for Vector<T>[src]

impl<T: Debug> Debug for Vector<T>[src]

impl<T> Default for Vector<T>[src]

impl FlagSearch for Vector<Flag>[src]

impl<T: FlagSearch> FlagSearch for Vector<T>[src]

impl<T: Clone, '_> From<&'_ Vec<T>> for Vector<T>[src]

impl<'_> From<&'_ str> for Vector<String>[src]

impl From<Option<String>> for Vector<String>[src]

impl<T> From<Option<Vec<T>>> for Vector<T>[src]

impl From<String> for Vector<String>[src]

impl<T> From<Vec<T>> for Vector<T>[src]

impl<T> From<Vector<T>> for Vector<Vector<T>>[src]

impl<T: PartialEq> PartialEq<Vector<T>> for Vector<T>[src]

impl<T: PartialOrd> PartialOrd<Vector<T>> for Vector<T>[src]

impl<T> StructuralPartialEq for Vector<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Vector<T> where
    T: RefUnwindSafe

impl<T> Send for Vector<T> where
    T: Send

impl<T> Sync for Vector<T> where
    T: Sync

impl<T> Unpin for Vector<T> where
    T: Unpin

impl<T> UnwindSafe for Vector<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.