pub struct IndexSlice<T = IndexLabel> {
pub start: Option<T>,
pub stop: Option<T>,
pub step: Option<isize>,
}Expand description
Slicing specification for index and MultiIndex selections, matching pd.IndexSlice.
Fields§
§start: Option<T>§stop: Option<T>§step: Option<isize>Implementations§
Source§impl<T> IndexSlice<T>
impl<T> IndexSlice<T>
Sourcepub const fn new(
start: Option<T>,
stop: Option<T>,
step: Option<isize>,
) -> IndexSlice<T>
pub const fn new( start: Option<T>, stop: Option<T>, step: Option<isize>, ) -> IndexSlice<T>
Create a new IndexSlice with explicit start, stop, and step.
Sourcepub const fn all() -> IndexSlice<T>
pub const fn all() -> IndexSlice<T>
Match a full slice [:].
Sourcepub const fn from_bounds(start: Option<T>, stop: Option<T>) -> IndexSlice<T>
pub const fn from_bounds(start: Option<T>, stop: Option<T>) -> IndexSlice<T>
Create an IndexSlice from start and stop bounds.
Sourcepub const fn from_start(start: T) -> IndexSlice<T>
pub const fn from_start(start: T) -> IndexSlice<T>
Create an IndexSlice with only a start bound [start:].
Sourcepub const fn from_stop(stop: T) -> IndexSlice<T>
pub const fn from_stop(stop: T) -> IndexSlice<T>
Create an IndexSlice with only a stop bound [:stop].
Trait Implementations§
Source§impl<T> Clone for IndexSlice<T>where
T: Clone,
impl<T> Clone for IndexSlice<T>where
T: Clone,
Source§fn clone(&self) -> IndexSlice<T>
fn clone(&self) -> IndexSlice<T>
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<T> Debug for IndexSlice<T>where
T: Debug,
impl<T> Debug for IndexSlice<T>where
T: Debug,
Source§impl<T> Default for IndexSlice<T>where
T: Default,
impl<T> Default for IndexSlice<T>where
T: Default,
Source§fn default() -> IndexSlice<T>
fn default() -> IndexSlice<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for IndexSlice<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for IndexSlice<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexSlice<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexSlice<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> Eq for IndexSlice<T>where
T: Eq,
Source§impl<T> PartialEq for IndexSlice<T>where
T: PartialEq,
impl<T> PartialEq for IndexSlice<T>where
T: PartialEq,
Source§impl<T> Serialize for IndexSlice<T>where
T: Serialize,
impl<T> Serialize for IndexSlice<T>where
T: Serialize,
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<T> StructuralPartialEq for IndexSlice<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Freeze for IndexSlice<T>
impl<T> RefUnwindSafe for IndexSlice<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for IndexSlice<T>
impl<T> Sync for IndexSlice<T>
impl<T> Unpin for IndexSlice<T>
impl<T> UnsafeUnpin for IndexSlice<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for IndexSlice<T>where
Option<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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more