Lines Matching defs:Cursor
27469 pub fn cursor_front(&self) -> Cursor<'_, T> {
27470 Cursor { index: 0, current: self.head, list: self }
27487 pub fn cursor_back(&self) -> Cursor<'_, T> {
27488 Cursor { index: self.len.checked_sub(1).unwrap_or(0), current: self.tail, list: self }
28050 /// A `Cursor` is like an iterator, except that it can freely seek back-and-forth.
28058 pub struct Cursor<'a, T: 'a> {
28065 impl<T> Clone for Cursor<'_, T> {
28067 let Cursor { index, current, list } = *self;
28068 Cursor { index, current, list }
28073 impl<T: fmt::Debug> fmt::Debug for Cursor<'_, T> {
28075 f.debug_tuple("Cursor").field(&self.list).field(&self.index()).finish()
28081 /// A `Cursor` is like an iterator, except that it can freely seek back-and-forth, and can
28103 impl<'a, T> Cursor<'a, T> {
28298 /// The lifetime of the returned `Cursor` is bound to that of the
28300 /// `CursorMut` is frozen for the lifetime of the `Cursor`.
28302 pub fn as_cursor(&self) -> Cursor<'_, T> {
28303 Cursor { list: self.list, current: self.current, index: self.index }
28747 unsafe impl<T: Sync> Send for Cursor<'_, T> {}
28750 unsafe impl<T: Sync> Sync for Cursor<'_, T> {}