pub struct IndexModifiers {
pub nth: Option<usize>,
pub first: Option<bool>,
pub last: Option<bool>,
}Expand description
IndexModifiers — the subset BaseAnchor can stack. Kept separate from
Modifiers so anchor callers can’t accidentally write the top-level
spatial form (which would be two surfaces for the same intent).
Fields§
§nth: Option<usize>Pick the nth match (0-indexed) from the surviving candidates.
first: Option<bool>Pick the first match (true) — overridden by nth if both set.
last: Option<bool>Pick the last match (true) — overridden by nth if both set.
Trait Implementations§
Source§impl Clone for IndexModifiers
impl Clone for IndexModifiers
Source§fn clone(&self) -> IndexModifiers
fn clone(&self) -> IndexModifiers
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexModifiers
impl Debug for IndexModifiers
Source§impl Default for IndexModifiers
impl Default for IndexModifiers
Source§fn default() -> IndexModifiers
fn default() -> IndexModifiers
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IndexModifierswhere
IndexModifiers: Default,
impl<'de> Deserialize<'de> for IndexModifierswhere
IndexModifiers: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexModifiers, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexModifiers, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for IndexModifiers
impl PartialEq for IndexModifiers
Source§impl Serialize for IndexModifiers
impl Serialize for IndexModifiers
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for IndexModifiers
Auto Trait Implementations§
impl Freeze for IndexModifiers
impl RefUnwindSafe for IndexModifiers
impl Send for IndexModifiers
impl Sync for IndexModifiers
impl Unpin for IndexModifiers
impl UnsafeUnpin for IndexModifiers
impl UnwindSafe for IndexModifiers
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