pub struct Cursor<'a, T, A = Global>where
T: 'a,
A: Allocator,{ /* private fields */ }linked_list_cursors)wayland and Linux only.Expand description
A cursor over a LinkedList.
A Cursor is like an iterator, except that it can freely seek back-and-forth.
Cursors always rest between two elements in the list, and index in a logically circular way.
To accommodate this, there is a โghostโ non-element that yields None between the head and
tail of the list.
When created, cursors start at the front of the list, or the โghostโ non-element if the list is empty.
Implementationsยง
Sourceยงimpl<'a, T, A> Cursor<'a, T, A>where
A: Allocator,
impl<'a, T, A> Cursor<'a, T, A>where
A: Allocator,
Sourcepub fn index(&self) -> Option<usize>
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn index(&self) -> Option<usize>
linked_list_cursors)Returns the cursor position index within the LinkedList.
This returns None if the cursor is currently pointing to the
โghostโ non-element.
Sourcepub fn move_next(&mut self)
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn move_next(&mut self)
linked_list_cursors)Moves the cursor to the next element of the LinkedList.
If the cursor is pointing to the โghostโ non-element then this will move it to
the first element of the LinkedList. If it is pointing to the last
element of the LinkedList then this will move it to the โghostโ non-element.
Sourcepub fn move_prev(&mut self)
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn move_prev(&mut self)
linked_list_cursors)Moves the cursor to the previous element of the LinkedList.
If the cursor is pointing to the โghostโ non-element then this will move it to
the last element of the LinkedList. If it is pointing to the first
element of the LinkedList then this will move it to the โghostโ non-element.
Sourcepub fn current(&self) -> Option<&'a T>
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn current(&self) -> Option<&'a T>
linked_list_cursors)Returns a reference to the element that the cursor is currently pointing to.
This returns None if the cursor is currently pointing to the
โghostโ non-element.
Sourcepub fn peek_next(&self) -> Option<&'a T>
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn peek_next(&self) -> Option<&'a T>
linked_list_cursors)Returns a reference to the next element.
If the cursor is pointing to the โghostโ non-element then this returns
the first element of the LinkedList. If it is pointing to the last
element of the LinkedList then this returns None.
Sourcepub fn peek_prev(&self) -> Option<&'a T>
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn peek_prev(&self) -> Option<&'a T>
linked_list_cursors)Returns a reference to the previous element.
If the cursor is pointing to the โghostโ non-element then this returns
the last element of the LinkedList. If it is pointing to the first
element of the LinkedList then this returns None.
Sourcepub fn front(&self) -> Option<&'a T>
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn front(&self) -> Option<&'a T>
linked_list_cursors)Provides a reference to the front element of the cursorโs parent list, or None if the list is empty.
Sourcepub fn back(&self) -> Option<&'a T>
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn back(&self) -> Option<&'a T>
linked_list_cursors)Provides a reference to the back element of the cursorโs parent list, or None if the list is empty.
Sourcepub fn as_list(&self) -> &'a LinkedList<T, A>
๐ฌThis is a nightly-only experimental API. (linked_list_cursors)
pub fn as_list(&self) -> &'a LinkedList<T, A>
linked_list_cursors)Provides a reference to the cursorโs parent list.
Trait Implementationsยง
impl<T, A> Send for Cursor<'_, T, A>
impl<T, A> Sync for Cursor<'_, T, A>
Auto Trait Implementationsยง
impl<'a, T, A> Freeze for Cursor<'a, T, A>
impl<'a, T, A> RefUnwindSafe for Cursor<'a, T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, A> Unpin for Cursor<'a, T, A>
impl<'a, T, A> UnwindSafe for Cursor<'a, T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementationsยง
Sourceยงimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Sourceยงfn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Sourceยงfn adapt_into(self) -> D
fn adapt_into(self) -> D
ยงimpl<T, Res> Apply<Res> for Twhere
T: ?Sized,
impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
Sourceยงimpl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Sourceยงfn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Sourceยงimpl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Sourceยงfn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Sourceยงimpl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Sourceยงtype Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Sourceยงfn components_from(colors: C) -> T
fn components_from(colors: C) -> T
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
Sourceยงimpl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Sourceยงfn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Sourceยงimpl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Sourceยงfn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงimpl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Sourceยงfn into_angle(self) -> U
fn into_angle(self) -> U
T.ยงimpl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
ยงfn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.Sourceยงimpl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Sourceยงtype Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Sourceยงfn into_color(self) -> U
fn into_color(self) -> U
Sourceยงimpl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Sourceยงfn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Sourceยงimpl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Sourceยงfn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Sourceยงimpl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Sourceยงtype Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Sourceยงfn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Sourceยงimpl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Sourceยงfn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more