Trait tuple::TupleElements
[−]
[src]
pub unsafe trait TupleElements: Sized { type Element; const N: usize; fn elements(&self) -> Elements<&Self>; fn elements_mut(&mut self) -> Elements<&mut Self>; fn into_elements(self) -> IntoElements<Self>; fn get(&self, n: usize) -> Option<&Self::Element>; fn get_mut(&mut self, n: usize) -> Option<&mut Self::Element>; fn from_iter<I>(iter: I) -> Option<Self>
where
I: Iterator<Item = Self::Element>; }
This trais is marked as unsafe, due to the requirement of the get_mut method, which is required work as an injective map of index -> element A tuple must not have a Drop implentation.
Associated Types
type Element
Associated Constants
Required Methods
fn elements(&self) -> Elements<&Self>
returns an Iterator over references to the elements of the tuple
fn elements_mut(&mut self) -> Elements<&mut Self>
returns an Iterator over mutable references to elements of the tuple
fn into_elements(self) -> IntoElements<Self>
fn get(&self, n: usize) -> Option<&Self::Element>
attempt to access the n-th element
fn get_mut(&mut self, n: usize) -> Option<&mut Self::Element>
attempt to access the n-th element mutablbly. This function shall not return the same data for two different indices.
fn from_iter<I>(iter: I) -> Option<Self> where
I: Iterator<Item = Self::Element>,
I: Iterator<Item = Self::Element>,
Implementors
impl<T> TupleElements for T1<T>
impl<T> TupleElements for (T,)
impl<T> TupleElements for T2<T, T>
impl<T> TupleElements for (T, T)
impl<T> TupleElements for T3<T, T, T>
impl<T> TupleElements for (T, T, T)
impl<T> TupleElements for T4<T, T, T, T>
impl<T> TupleElements for (T, T, T, T)
impl<T> TupleElements for T5<T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T)
impl<T> TupleElements for T6<T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T)
impl<T> TupleElements for T7<T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T)
impl<T> TupleElements for T8<T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T)
impl<T> TupleElements for T9<T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T)
impl<T> TupleElements for T10<T, T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T, T)
impl<T> TupleElements for T11<T, T, T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T, T, T)
impl<T> TupleElements for T12<T, T, T, T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T, T, T, T)
impl<T> TupleElements for T13<T, T, T, T, T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T, T, T, T, T)
impl<T> TupleElements for T14<T, T, T, T, T, T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T, T, T, T, T, T)
impl<T> TupleElements for T15<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)
impl<T> TupleElements for T16<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T>
impl<T> TupleElements for (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)