pub enum Column {
Series(SeriesColumn),
Partitioned(PartitionedColumn),
Scalar(ScalarColumn),
}
Expand description
A column within a DataFrame
.
This is lazily initialized to a Series
with methods like
as_materialized_series
and
take_materialized_series
.
Currently, there are two ways to represent a Column
.
- A
Series
of values - A
ScalarColumn
that repeats a singleScalar
Variants§
Implementations§
Source§impl Column
impl Column
pub fn new<T, Phantom>(name: PlSmallStr, values: T) -> Column
pub fn new_empty(name: PlSmallStr, dtype: &DataType) -> Column
pub fn new_scalar(name: PlSmallStr, scalar: Scalar, length: usize) -> Column
pub fn new_partitioned( name: PlSmallStr, scalar: Scalar, length: usize, ) -> Column
pub fn new_row_index( name: PlSmallStr, offset: u32, length: usize, ) -> Result<Column, PolarsError>
Sourcepub fn as_materialized_series(&self) -> &Series
pub fn as_materialized_series(&self) -> &Series
Sourcepub fn as_materialized_series_maintain_scalar(&self) -> Series
pub fn as_materialized_series_maintain_scalar(&self) -> Series
If the memory repr of this Column is a scalar, a unit-length Series will be returned.
Sourcepub fn into_materialized_series(&mut self) -> &mut Series
pub fn into_materialized_series(&mut self) -> &mut Series
Turn Column
into a Column::Series
.
This may need to materialize the Series
on the first invocation for a specific column.
Sourcepub fn take_materialized_series(self) -> Series
pub fn take_materialized_series(self) -> Series
pub fn dtype(&self) -> &DataType
pub fn field(&self) -> Cow<'_, Field>
pub fn name(&self) -> &PlSmallStr
pub fn len(&self) -> usize
pub fn with_name(self, name: PlSmallStr) -> Column
pub fn rename(&mut self, name: PlSmallStr)
pub fn as_series(&self) -> Option<&Series>
pub fn as_partitioned_column(&self) -> Option<&PartitionedColumn>
pub fn as_scalar_column(&self) -> Option<&ScalarColumn>
pub fn as_scalar_column_mut(&mut self) -> Option<&mut ScalarColumn>
pub fn try_bool(&self) -> Option<&ChunkedArray<BooleanType>>
pub fn try_i8(&self) -> Option<&ChunkedArray<Int8Type>>
pub fn try_i16(&self) -> Option<&ChunkedArray<Int16Type>>
pub fn try_i32(&self) -> Option<&ChunkedArray<Int32Type>>
pub fn try_i64(&self) -> Option<&ChunkedArray<Int64Type>>
pub fn try_u8(&self) -> Option<&ChunkedArray<UInt8Type>>
pub fn try_u16(&self) -> Option<&ChunkedArray<UInt16Type>>
pub fn try_u32(&self) -> Option<&ChunkedArray<UInt32Type>>
pub fn try_u64(&self) -> Option<&ChunkedArray<UInt64Type>>
pub fn try_f32(&self) -> Option<&ChunkedArray<Float32Type>>
pub fn try_f64(&self) -> Option<&ChunkedArray<Float64Type>>
pub fn try_str(&self) -> Option<&ChunkedArray<StringType>>
pub fn try_list(&self) -> Option<&ChunkedArray<ListType>>
pub fn try_binary(&self) -> Option<&ChunkedArray<BinaryType>>
pub fn try_idx(&self) -> Option<&ChunkedArray<UInt32Type>>
pub fn try_binary_offset(&self) -> Option<&ChunkedArray<BinaryOffsetType>>
pub fn try_datetime(&self) -> Option<&Logical<DatetimeType, Int64Type>>
pub fn try_struct(&self) -> Option<&ChunkedArray<StructType>>
pub fn try_decimal(&self) -> Option<&Logical<DecimalType, Int128Type>>
pub fn try_array(&self) -> Option<&ChunkedArray<FixedSizeListType>>
pub fn try_categorical(&self) -> Option<&CategoricalChunked>
pub fn try_date(&self) -> Option<&Logical<DateType, Int32Type>>
pub fn try_duration(&self) -> Option<&Logical<DurationType, Int64Type>>
pub fn bool(&self) -> Result<&ChunkedArray<BooleanType>, PolarsError>
pub fn i8(&self) -> Result<&ChunkedArray<Int8Type>, PolarsError>
pub fn i16(&self) -> Result<&ChunkedArray<Int16Type>, PolarsError>
pub fn i32(&self) -> Result<&ChunkedArray<Int32Type>, PolarsError>
pub fn i64(&self) -> Result<&ChunkedArray<Int64Type>, PolarsError>
pub fn i128(&self) -> Result<&ChunkedArray<Int128Type>, PolarsError>
pub fn u8(&self) -> Result<&ChunkedArray<UInt8Type>, PolarsError>
pub fn u16(&self) -> Result<&ChunkedArray<UInt16Type>, PolarsError>
pub fn u32(&self) -> Result<&ChunkedArray<UInt32Type>, PolarsError>
pub fn u64(&self) -> Result<&ChunkedArray<UInt64Type>, PolarsError>
pub fn f32(&self) -> Result<&ChunkedArray<Float32Type>, PolarsError>
pub fn f64(&self) -> Result<&ChunkedArray<Float64Type>, PolarsError>
pub fn str(&self) -> Result<&ChunkedArray<StringType>, PolarsError>
pub fn list(&self) -> Result<&ChunkedArray<ListType>, PolarsError>
pub fn binary(&self) -> Result<&ChunkedArray<BinaryType>, PolarsError>
pub fn idx(&self) -> Result<&ChunkedArray<UInt32Type>, PolarsError>
pub fn binary_offset( &self, ) -> Result<&ChunkedArray<BinaryOffsetType>, PolarsError>
pub fn datetime(&self) -> Result<&Logical<DatetimeType, Int64Type>, PolarsError>
pub fn struct_(&self) -> Result<&ChunkedArray<StructType>, PolarsError>
pub fn decimal(&self) -> Result<&Logical<DecimalType, Int128Type>, PolarsError>
pub fn array(&self) -> Result<&ChunkedArray<FixedSizeListType>, PolarsError>
pub fn categorical(&self) -> Result<&CategoricalChunked, PolarsError>
pub fn date(&self) -> Result<&Logical<DateType, Int32Type>, PolarsError>
pub fn duration(&self) -> Result<&Logical<DurationType, Int64Type>, PolarsError>
pub fn cast_with_options( &self, dtype: &DataType, options: CastOptions, ) -> Result<Column, PolarsError>
pub fn strict_cast(&self, dtype: &DataType) -> Result<Column, PolarsError>
pub fn cast(&self, dtype: &DataType) -> Result<Column, PolarsError>
Sourcepub unsafe fn cast_unchecked(
&self,
dtype: &DataType,
) -> Result<Column, PolarsError>
pub unsafe fn cast_unchecked( &self, dtype: &DataType, ) -> Result<Column, PolarsError>
§Safety
This can lead to invalid memory access in downstream code.
pub fn clear(&self) -> Column
pub fn shrink_to_fit(&mut self)
pub fn new_from_index(&self, index: usize, length: usize) -> Column
pub fn has_nulls(&self) -> bool
pub fn is_null(&self) -> ChunkedArray<BooleanType>
pub fn is_not_null(&self) -> ChunkedArray<BooleanType>
pub fn to_physical_repr(&self) -> Column
Sourcepub unsafe fn from_physical_unchecked(
&self,
dtype: &DataType,
) -> Result<Column, PolarsError>
pub unsafe fn from_physical_unchecked( &self, dtype: &DataType, ) -> Result<Column, PolarsError>
§Safety
This can lead to invalid memory access in downstream code.
pub fn head(&self, length: Option<usize>) -> Column
pub fn tail(&self, length: Option<usize>) -> Column
pub fn slice(&self, offset: i64, length: usize) -> Column
pub fn split_at(&self, offset: i64) -> (Column, Column)
pub fn null_count(&self) -> usize
pub fn take( &self, indices: &ChunkedArray<UInt32Type>, ) -> Result<Column, PolarsError>
pub fn take_slice(&self, indices: &[u32]) -> Result<Column, PolarsError>
Sourcepub unsafe fn take_unchecked(
&self,
indices: &ChunkedArray<UInt32Type>,
) -> Column
pub unsafe fn take_unchecked( &self, indices: &ChunkedArray<UInt32Type>, ) -> Column
§Safety
No bounds on the indexes are performed.
Sourcepub unsafe fn take_slice_unchecked(&self, indices: &[u32]) -> Column
pub unsafe fn take_slice_unchecked(&self, indices: &[u32]) -> Column
§Safety
No bounds on the indexes are performed.
Sourcepub unsafe fn agg_min(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_min(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_max(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_max(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_mean(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_mean(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_sum(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_sum(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_first(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_first(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_last(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_last(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_n_unique(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_n_unique(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_quantile(
&self,
groups: &GroupsType,
quantile: f64,
method: QuantileMethod,
) -> Column
pub unsafe fn agg_quantile( &self, groups: &GroupsType, quantile: f64, method: QuantileMethod, ) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_median(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_median(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_var(&self, groups: &GroupsType, ddof: u8) -> Column
pub unsafe fn agg_var(&self, groups: &GroupsType, ddof: u8) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_std(&self, groups: &GroupsType, ddof: u8) -> Column
pub unsafe fn agg_std(&self, groups: &GroupsType, ddof: u8) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub unsafe fn agg_list(&self, groups: &GroupsType) -> Column
pub unsafe fn agg_list(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
Sourcepub fn agg_valid_count(&self, groups: &GroupsType) -> Column
pub fn agg_valid_count(&self, groups: &GroupsType) -> Column
§Safety
Does no bounds checks, groups must be correct.
pub fn full_null(name: PlSmallStr, size: usize, dtype: &DataType) -> Column
pub fn is_empty(&self) -> bool
pub fn reverse(&self) -> Column
pub fn equals(&self, other: &Column) -> bool
pub fn equals_missing(&self, other: &Column) -> bool
pub fn set_sorted_flag(&mut self, sorted: IsSorted)
pub fn get_flags(&self) -> StatisticsFlags
Sourcepub fn set_flags(&mut self, flags: StatisticsFlags) -> bool
pub fn set_flags(&mut self, flags: StatisticsFlags) -> bool
Returns whether the flags were set
pub fn vec_hash( &self, build_hasher: SeedableRandomState, buf: &mut Vec<u64>, ) -> Result<(), PolarsError>
pub fn vec_hash_combine( &self, build_hasher: SeedableRandomState, hashes: &mut [u64], ) -> Result<(), PolarsError>
pub fn append(&mut self, other: &Column) -> Result<&mut Column, PolarsError>
pub fn append_owned( &mut self, other: Column, ) -> Result<&mut Column, PolarsError>
pub fn arg_sort(&self, options: SortOptions) -> ChunkedArray<UInt32Type>
pub fn arg_sort_multiple( &self, by: &[Column], options: &SortMultipleOptions, ) -> Result<ChunkedArray<UInt32Type>, PolarsError>
pub fn arg_unique(&self) -> Result<ChunkedArray<UInt32Type>, PolarsError>
pub fn bit_repr(&self) -> Option<BitRepr>
pub fn into_frame(self) -> DataFrame
pub fn extend(&mut self, other: &Column) -> Result<&mut Column, PolarsError>
pub fn rechunk(&self) -> Column
pub fn explode(&self) -> Result<Column, PolarsError>
pub fn implode(&self) -> Result<ChunkedArray<ListType>, PolarsError>
pub fn fill_null( &self, strategy: FillNullStrategy, ) -> Result<Column, PolarsError>
pub fn divide(&self, rhs: &Column) -> Result<Column, PolarsError>
pub fn shift(&self, periods: i64) -> Column
pub fn zip_with( &self, mask: &ChunkedArray<BooleanType>, other: &Column, ) -> Result<Column, PolarsError>
pub fn zip_with_same_type( &self, mask: &ChunkedArray<BooleanType>, other: &Column, ) -> Result<Column, PolarsError>
pub fn drop_nulls(&self) -> Column
Sourcepub fn as_list(&self) -> ChunkedArray<ListType>
pub fn as_list(&self) -> ChunkedArray<ListType>
Packs every element into a list.
pub fn is_sorted_flag(&self) -> IsSorted
pub fn unique(&self) -> Result<Column, PolarsError>
pub fn unique_stable(&self) -> Result<Column, PolarsError>
pub fn reshape_list( &self, dimensions: &[ReshapeDimension], ) -> Result<Column, PolarsError>
pub fn reshape_array( &self, dimensions: &[ReshapeDimension], ) -> Result<Column, PolarsError>
pub fn sort(&self, sort_options: SortOptions) -> Result<Column, PolarsError>
pub fn filter( &self, filter: &ChunkedArray<BooleanType>, ) -> Result<Column, PolarsError>
pub fn shuffle(&self, seed: Option<u64>) -> Column
pub fn sample_frac( &self, frac: f64, with_replacement: bool, shuffle: bool, seed: Option<u64>, ) -> Result<Column, PolarsError>
pub fn sample_n( &self, n: usize, with_replacement: bool, shuffle: bool, seed: Option<u64>, ) -> Result<Column, PolarsError>
pub fn gather_every( &self, n: usize, offset: usize, ) -> Result<Column, PolarsError>
pub fn extend_constant( &self, value: AnyValue<'_>, n: usize, ) -> Result<Column, PolarsError>
pub fn is_finite(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn is_infinite(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn is_nan(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn is_not_nan(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn wrapping_trunc_div_scalar<T>(&self, rhs: T) -> Column
pub fn product(&self) -> Result<Scalar, PolarsError>
pub fn phys_iter(&self) -> Box<dyn ExactSizeIterator<Item = AnyValue<'_>> + '_>
pub fn get(&self, index: usize) -> Result<AnyValue<'_>, PolarsError>
Sourcepub unsafe fn get_unchecked(&self, index: usize) -> AnyValue<'_>
pub unsafe fn get_unchecked(&self, index: usize) -> AnyValue<'_>
§Safety
Does not perform bounds check on index
pub fn get_object( &self, index: usize, ) -> Option<&(dyn PolarsObjectSafe + 'static)>
pub fn bitand(&self, rhs: &Column) -> Result<Column, PolarsError>
pub fn bitor(&self, rhs: &Column) -> Result<Column, PolarsError>
pub fn bitxor(&self, rhs: &Column) -> Result<Column, PolarsError>
pub fn try_add_owned(self, other: Column) -> Result<Column, PolarsError>
pub fn try_sub_owned(self, other: Column) -> Result<Column, PolarsError>
pub fn try_mul_owned(self, other: Column) -> Result<Column, PolarsError>
pub fn min_reduce(&self) -> Result<Scalar, PolarsError>
pub fn max_reduce(&self) -> Result<Scalar, PolarsError>
pub fn median_reduce(&self) -> Result<Scalar, PolarsError>
pub fn mean_reduce(&self) -> Scalar
pub fn std_reduce(&self, ddof: u8) -> Result<Scalar, PolarsError>
pub fn var_reduce(&self, ddof: u8) -> Result<Scalar, PolarsError>
pub fn sum_reduce(&self) -> Result<Scalar, PolarsError>
pub fn and_reduce(&self) -> Result<Scalar, PolarsError>
pub fn or_reduce(&self) -> Result<Scalar, PolarsError>
pub fn xor_reduce(&self) -> Result<Scalar, PolarsError>
pub fn n_unique(&self) -> Result<usize, PolarsError>
pub fn quantile_reduce( &self, quantile: f64, method: QuantileMethod, ) -> Result<Scalar, PolarsError>
pub fn sort_with(&self, options: SortOptions) -> Result<Column, PolarsError>
pub fn map_unary_elementwise_to_bool( &self, f: impl Fn(&Series) -> ChunkedArray<BooleanType>, ) -> ChunkedArray<BooleanType>
pub fn try_map_unary_elementwise_to_bool( &self, f: impl Fn(&Series) -> Result<ChunkedArray<BooleanType>, PolarsError>, ) -> Result<ChunkedArray<BooleanType>, PolarsError>
pub fn apply_unary_elementwise(&self, f: impl Fn(&Series) -> Series) -> Column
pub fn try_apply_unary_elementwise( &self, f: impl Fn(&Series) -> Result<Series, PolarsError>, ) -> Result<Column, PolarsError>
pub fn apply_broadcasting_binary_elementwise( &self, other: &Column, op: impl Fn(&Series, &Series) -> Series, ) -> Result<Column, PolarsError>
pub fn try_apply_broadcasting_binary_elementwise( &self, other: &Column, op: impl Fn(&Series, &Series) -> Result<Series, PolarsError>, ) -> Result<Column, PolarsError>
pub fn apply_binary_elementwise( &self, other: &Column, f: impl Fn(&Series, &Series) -> Series, f_lb: impl Fn(&Scalar, &Series) -> Series, f_rb: impl Fn(&Series, &Scalar) -> Series, ) -> Column
pub fn try_apply_binary_elementwise( &self, other: &Column, f: impl Fn(&Series, &Series) -> Result<Series, PolarsError>, f_lb: impl Fn(&Scalar, &Series) -> Result<Series, PolarsError>, f_rb: impl Fn(&Series, &Scalar) -> Result<Series, PolarsError>, ) -> Result<Column, PolarsError>
pub fn approx_n_unique(&self) -> Result<u32, PolarsError>
pub fn n_chunks(&self) -> usize
pub fn rechunk_to_arrow(self, compat_level: CompatLevel) -> Box<dyn Array>
Trait Implementations§
Source§impl ChunkCompareEq<&Column> for Column
impl ChunkCompareEq<&Column> for Column
Source§fn equal(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn equal(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking for equality.
Source§fn equal_missing(
&self,
rhs: &Column,
) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn equal_missing( &self, rhs: &Column, ) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking for equality.
Source§fn not_equal(
&self,
rhs: &Column,
) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn not_equal( &self, rhs: &Column, ) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking for inequality.
Source§fn not_equal_missing(
&self,
rhs: &Column,
) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn not_equal_missing( &self, rhs: &Column, ) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking for inequality.
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl ChunkCompareIneq<&Column> for Column
impl ChunkCompareIneq<&Column> for Column
Source§fn gt(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn gt(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking if self > rhs.
Source§fn gt_eq(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn gt_eq(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking if self >= rhs.
Source§fn lt(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn lt(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking if self < rhs.
Source§fn lt_eq(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn lt_eq(&self, rhs: &Column) -> Result<ChunkedArray<BooleanType>, PolarsError>
Create a boolean mask by checking if self <= rhs.
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl<'de> Deserialize<'de> for Column
impl<'de> Deserialize<'de> for Column
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Column, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Column, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<ScalarColumn> for Column
impl From<ScalarColumn> for Column
Source§fn from(value: ScalarColumn) -> Column
fn from(value: ScalarColumn) -> Column
Source§impl FromIterator<Column> for DataFrame
impl FromIterator<Column> for DataFrame
Source§impl IntoColumn for Column
impl IntoColumn for Column
fn into_column(self) -> Column
Source§impl Serialize for Column
impl Serialize for Column
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,
Source§impl TakeChunked for Column
impl TakeChunked for Column
Source§unsafe fn take_chunked_unchecked<const B: u64>(
&self,
by: &[ChunkId<B>],
sorted: IsSorted,
avoid_sharing: bool,
) -> Column
unsafe fn take_chunked_unchecked<const B: u64>( &self, by: &[ChunkId<B>], sorted: IsSorted, avoid_sharing: bool, ) -> Column
Auto Trait Implementations§
impl !Freeze for Column
impl !RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl !UnwindSafe for Column
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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