pub struct Row<T> { /* private fields */ }
Expand description
A row in the grid.
Implementations§
source§impl<T: Default> Row<T>
impl<T: Default> Row<T>
sourcepub fn new(columns: usize) -> Row<T>
pub fn new(columns: usize) -> Row<T>
Create a new terminal row.
Ideally the template
should be Copy
in all performance sensitive scenarios.
source§impl<T> Row<T>
impl<T> Row<T>
pub fn from_vec(vec: Vec<T>, occ: usize) -> Row<T>
pub fn len(&self) -> usize
pub fn last(&self) -> Option<&T>
pub fn last_mut(&mut self) -> Option<&mut T>
pub fn append(&mut self, vec: &mut Vec<T>)where
T: GridCell,
pub fn append_front(&mut self, vec: Vec<T>)
pub fn front_split_off(&mut self, at: usize) -> Vec<T>
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Row<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Row<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, T> IntoIterator for &'a Row<T>
impl<'a, T> IntoIterator for &'a Row<T>
source§impl<'a, T> IntoIterator for &'a mut Row<T>
impl<'a, T> IntoIterator for &'a mut Row<T>
source§impl LineLength for Row<Cell>
impl LineLength for Row<Cell>
source§fn line_length(&self) -> Column
fn line_length(&self) -> Column
Calculate the occupied line length.
Auto Trait Implementations§
impl<T> Freeze for Row<T>
impl<T> RefUnwindSafe for Row<T>where
T: RefUnwindSafe,
impl<T> Send for Row<T>where
T: Send,
impl<T> Sync for Row<T>where
T: Sync,
impl<T> Unpin for Row<T>where
T: Unpin,
impl<T> UnwindSafe for Row<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)