[−][src]Struct combu::vector::Vector
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
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
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]
fn find_long_flag(&self, name_or_alias: &str) -> LongFound<&Flag>
[src]
fn find_short_flag(&self, short_alias: &char) -> Option<&Flag>
[src]
fn find(&self, flag_name: &str) -> Option<&Flag>
[src]
impl<T: FlagSearch> FlagSearch for Vector<T>
[src]
fn find_long_flag(&self, name_or_alias: &str) -> LongFound<&Flag>
[src]
fn find_short_flag(&self, name_or_alias: &char) -> Option<&Flag>
[src]
fn find(&self, name_or_alias: &str) -> Option<&Flag>
[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]
fn partial_cmp(&self, other: &Vector<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Vector<T>) -> bool
[src]
fn le(&self, other: &Vector<T>) -> bool
[src]
fn gt(&self, other: &Vector<T>) -> bool
[src]
fn ge(&self, other: &Vector<T>) -> bool
[src]
impl<T> StructuralPartialEq for Vector<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Vector<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Vector<T> where
T: Send,
T: Send,
impl<T> Sync for Vector<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Vector<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Vector<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,