Skip to main content

Breaks

Struct Breaks 

Source
pub struct Breaks(/* private fields */);
Expand description

Breakpoints delimiting bins by value.

Always free of nulls and non-decreasing.

Implementations§

Methods from Deref<Target = Series>§

Source

pub fn fill_null( &self, strategy: FillNullStrategy, ) -> Result<Series, PolarsError>

Replace None values with one of the following strategies:

  • Forward fill (replace None with the previous value)
  • Backward fill (replace None with the next value)
  • Mean fill (replace None with the mean of the whole array)
  • Min fill (replace None with the minimum of the whole array)
  • Max fill (replace None with the maximum of the whole array)
  • Zero fill (replace None with the value zero)
  • One fill (replace None with the value one)

NOTE: If you want to fill the Nones with a value use the fill_null operation on ChunkedArray<T>.

§Example
fn example() -> PolarsResult<()> {
    let s = Column::new("some_missing".into(), &[Some(1), None, Some(2)]);

    let filled = s.fill_null(FillNullStrategy::Forward(None))?;
    assert_eq!(Vec::from(filled.i32()?), &[Some(1), Some(1), Some(2)]);

    let filled = s.fill_null(FillNullStrategy::Backward(None))?;
    assert_eq!(Vec::from(filled.i32()?), &[Some(1), Some(2), Some(2)]);

    let filled = s.fill_null(FillNullStrategy::Min)?;
    assert_eq!(Vec::from(filled.i32()?), &[Some(1), Some(1), Some(2)]);

    let filled = s.fill_null(FillNullStrategy::Max)?;
    assert_eq!(Vec::from(filled.i32()?), &[Some(1), Some(2), Some(2)]);

    let filled = s.fill_null(FillNullStrategy::Mean)?;
    assert_eq!(Vec::from(filled.i32()?), &[Some(1), Some(1), Some(2)]);

    let filled = s.fill_null(FillNullStrategy::Zero)?;
    assert_eq!(Vec::from(filled.i32()?), &[Some(1), Some(0), Some(2)]);

    let filled = s.fill_null(FillNullStrategy::One)?;
    assert_eq!(Vec::from(filled.i32()?), &[Some(1), Some(1), Some(2)]);

    Ok(())
}
example();
Source

pub fn sample_n( &self, n: usize, with_replacement: bool, shuffle: Option<bool>, seed: Option<u64>, ) -> Result<Series, PolarsError>

Source

pub fn sample_frac( &self, frac: f64, with_replacement: bool, shuffle: Option<bool>, seed: Option<u64>, ) -> Result<Series, PolarsError>

Sample a fraction between 0.0-1.0 of this ChunkedArray.

Source

pub fn shuffle(&self, seed: Option<u64>) -> Series

Source

pub fn fmt_list(&self) -> String

Source

pub fn serialize_into_writer( &self, writer: &mut dyn Write, ) -> Result<(), PolarsError>

Source

pub fn serialize_to_bytes(&self) -> Result<Vec<u8>, PolarsError>

Source

pub fn wrapping_trunc_div_scalar<T>(&self, rhs: T) -> Series
where T: Num + NumCast,

Source

pub fn to_arrow( &self, chunk_idx: usize, compat_level: CompatLevel, ) -> Box<dyn Array>

Export this Series to an arrow array. The dtype of the returned array will be chosen according to the provided compat_level.

Source

pub fn to_arrow_with_field<'a>( &self, chunk_idx: usize, output_arrow_field: Cow<'a, Field>, skip_attach_pl_metadata: bool, ) -> Result<Box<dyn Array>, PolarsError>

Export this Series to an arrow array. The dtype of the returned array will match the provided arrow field. Returns an error if this Series cannot be exported to the arrow field.

Source

pub fn iter(&self) -> SeriesIter<'_>

Iterate over Series as AnyValue.

§Panics

This will panic if the array is not rechunked first.

Source

pub fn canonicalize_maps(&self) -> Result<Option<Series>, PolarsError>

Canonicalize all nested Maps bottom-up using first-position/last-value semantics. Returns None if unchanged.

Source

pub fn try_i8(&self) -> Option<&ChunkedArray<Int8Type>>

Unpack to ChunkedArray of dtype DataType::Int8

Source

pub fn try_i16(&self) -> Option<&ChunkedArray<Int16Type>>

Unpack to ChunkedArray of dtype DataType::Int16

Source

pub fn try_i32(&self) -> Option<&ChunkedArray<Int32Type>>

Unpack to ChunkedArray

let s = Series::new("foo".into(), [1i32 ,2, 3]);
let s_squared: Series = s.i32()
    .unwrap()
    .iter()
    .map(|opt_v| {
        match opt_v {
            Some(v) => Some(v * v),
            None => None, // null value
        }
}).collect();

Unpack to ChunkedArray of dtype DataType::Int32

Source

pub fn try_i64(&self) -> Option<&ChunkedArray<Int64Type>>

Unpack to ChunkedArray of dtype DataType::Int64

Source

pub fn try_i128(&self) -> Option<&ChunkedArray<Int128Type>>

Available on crate feature dtype-i128 only.

Unpack to ChunkedArray of dtype DataType::Int128

Source

pub fn try_f16(&self) -> Option<&ChunkedArray<Float16Type>>

Available on crate feature dtype-f16 only.

Unpack to ChunkedArray of dtype DataType::Float16

Source

pub fn try_f32(&self) -> Option<&ChunkedArray<Float32Type>>

Unpack to ChunkedArray of dtype DataType::Float32

Source

pub fn try_f64(&self) -> Option<&ChunkedArray<Float64Type>>

Unpack to ChunkedArray of dtype DataType::Float64

Source

pub fn try_u8(&self) -> Option<&ChunkedArray<UInt8Type>>

Unpack to ChunkedArray of dtype DataType::UInt8

Source

pub fn try_u16(&self) -> Option<&ChunkedArray<UInt16Type>>

Unpack to ChunkedArray of dtype DataType::UInt16

Source

pub fn try_u32(&self) -> Option<&ChunkedArray<UInt32Type>>

Unpack to ChunkedArray of dtype DataType::UInt32

Source

pub fn try_u64(&self) -> Option<&ChunkedArray<UInt64Type>>

Unpack to ChunkedArray of dtype DataType::UInt64

Source

pub fn try_u128(&self) -> Option<&ChunkedArray<UInt128Type>>

Available on crate feature dtype-u128 only.

Unpack to ChunkedArray of dtype DataType::UInt128

Source

pub fn try_bool(&self) -> Option<&ChunkedArray<BooleanType>>

Unpack to ChunkedArray of dtype DataType::Boolean

Source

pub fn try_str(&self) -> Option<&ChunkedArray<StringType>>

Unpack to ChunkedArray of dtype DataType::String

Source

pub fn try_binary(&self) -> Option<&ChunkedArray<BinaryType>>

Unpack to ChunkedArray of dtype DataType::Binary

Source

pub fn try_binary_offset(&self) -> Option<&ChunkedArray<BinaryOffsetType>>

Unpack to ChunkedArray of dtype DataType::Binary

Source

pub fn try_time(&self) -> Option<&Logical<TimeType, Int64Type>>

Available on crate feature dtype-time only.

Unpack to ChunkedArray of dtype DataType::Time

Source

pub fn try_date(&self) -> Option<&Logical<DateType, Int32Type>>

Available on crate feature dtype-date only.

Unpack to ChunkedArray of dtype DataType::Date

Source

pub fn try_datetime(&self) -> Option<&Logical<DatetimeType, Int64Type>>

Available on crate feature dtype-datetime only.

Unpack to ChunkedArray of dtype DataType::Datetime

Source

pub fn try_duration(&self) -> Option<&Logical<DurationType, Int64Type>>

Available on crate feature dtype-duration only.

Unpack to ChunkedArray of dtype DataType::Duration

Source

pub fn try_decimal(&self) -> Option<&Logical<DecimalType, Int128Type>>

Available on crate feature dtype-decimal only.

Unpack to ChunkedArray of dtype DataType::Decimal

Source

pub fn try_list(&self) -> Option<&ChunkedArray<ListType>>

Unpack to ChunkedArray of dtype list

Source

pub fn try_array(&self) -> Option<&ChunkedArray<FixedSizeListType>>

Available on crate feature dtype-array only.

Unpack to ChunkedArray of dtype DataType::Array

Source

pub fn try_cat<T>( &self, ) -> Option<&Logical<T, <T as PolarsCategoricalType>::PolarsPhysical>>

Available on crate feature dtype-categorical only.
Source

pub fn try_cat8( &self, ) -> Option<&Logical<Categorical8Type, <Categorical8Type as PolarsCategoricalType>::PolarsPhysical>>

Available on crate feature dtype-categorical only.

Unpack to ChunkedArray of dtype DataType::Categorical or DataType::Enum with a physical type of UInt8.

Source

pub fn try_cat16( &self, ) -> Option<&Logical<Categorical16Type, <Categorical16Type as PolarsCategoricalType>::PolarsPhysical>>

Available on crate feature dtype-categorical only.
Source

pub fn try_cat32( &self, ) -> Option<&Logical<Categorical32Type, <Categorical32Type as PolarsCategoricalType>::PolarsPhysical>>

Available on crate feature dtype-categorical only.
Source

pub fn try_map(&self) -> Option<&MapChunked>

Available on crate feature dtype-map only.

Unpack to MapChunked of dtype DataType::Map.

Source

pub fn try_struct(&self) -> Option<&ChunkedArray<StructType>>

Available on crate feature dtype-struct only.

Unpack to ChunkedArray of dtype DataType::Struct

Source

pub fn try_null(&self) -> Option<&NullChunked>

Unpack to ChunkedArray of dtype DataType::Null

Source

pub fn i8(&self) -> Result<&ChunkedArray<Int8Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Int8

Source

pub fn i16(&self) -> Result<&ChunkedArray<Int16Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Int16

Source

pub fn i32(&self) -> Result<&ChunkedArray<Int32Type>, PolarsError>

Unpack to ChunkedArray

let s = Series::new("foo".into(), [1i32 ,2, 3]);
let s_squared: Series = s.i32()
    .unwrap()
    .iter()
    .map(|opt_v| {
        match opt_v {
            Some(v) => Some(v * v),
            None => None, // null value
        }
}).collect();

Unpack to ChunkedArray of dtype DataType::Int32

Source

pub fn i64(&self) -> Result<&ChunkedArray<Int64Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Int64

Source

pub fn i128(&self) -> Result<&ChunkedArray<Int128Type>, PolarsError>

Available on crate feature dtype-i128 only.

Unpack to ChunkedArray of dtype DataType::Int128

Source

pub fn f16(&self) -> Result<&ChunkedArray<Float16Type>, PolarsError>

Available on crate feature dtype-f16 only.

Unpack to ChunkedArray of dtype DataType::Float16

Source

pub fn f32(&self) -> Result<&ChunkedArray<Float32Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Float32

Source

pub fn f64(&self) -> Result<&ChunkedArray<Float64Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Float64

Source

pub fn u8(&self) -> Result<&ChunkedArray<UInt8Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::UInt8

Source

pub fn u16(&self) -> Result<&ChunkedArray<UInt16Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::UInt16

Source

pub fn u32(&self) -> Result<&ChunkedArray<UInt32Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::UInt32

Source

pub fn u64(&self) -> Result<&ChunkedArray<UInt64Type>, PolarsError>

Unpack to ChunkedArray of dtype DataType::UInt64

Source

pub fn u128(&self) -> Result<&ChunkedArray<UInt128Type>, PolarsError>

Available on crate feature dtype-u128 only.

Unpack to ChunkedArray of dtype DataType::UInt128

Source

pub fn bool(&self) -> Result<&ChunkedArray<BooleanType>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Boolean

Source

pub fn str(&self) -> Result<&ChunkedArray<StringType>, PolarsError>

Unpack to ChunkedArray of dtype DataType::String

Source

pub fn binary(&self) -> Result<&ChunkedArray<BinaryType>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Binary

Source

pub fn binary_offset( &self, ) -> Result<&ChunkedArray<BinaryOffsetType>, PolarsError>

Unpack to ChunkedArray of dtype DataType::Binary

Source

pub fn time(&self) -> Result<&Logical<TimeType, Int64Type>, PolarsError>

Available on crate feature dtype-time only.

Unpack to ChunkedArray of dtype DataType::Time

Source

pub fn date(&self) -> Result<&Logical<DateType, Int32Type>, PolarsError>

Available on crate feature dtype-date only.

Unpack to ChunkedArray of dtype DataType::Date

Source

pub fn datetime(&self) -> Result<&Logical<DatetimeType, Int64Type>, PolarsError>

Available on crate feature dtype-datetime only.

Unpack to ChunkedArray of dtype DataType::Datetime

Source

pub fn duration(&self) -> Result<&Logical<DurationType, Int64Type>, PolarsError>

Available on crate feature dtype-duration only.

Unpack to ChunkedArray of dtype DataType::Duration

Source

pub fn decimal(&self) -> Result<&Logical<DecimalType, Int128Type>, PolarsError>

Available on crate feature dtype-decimal only.

Unpack to ChunkedArray of dtype DataType::Decimal

Source

pub fn list(&self) -> Result<&ChunkedArray<ListType>, PolarsError>

Unpack to ChunkedArray of dtype list

Source

pub fn array(&self) -> Result<&ChunkedArray<FixedSizeListType>, PolarsError>

Available on crate feature dtype-array only.

Unpack to ChunkedArray of dtype DataType::Array

Source

pub fn cat<T>( &self, ) -> Result<&Logical<T, <T as PolarsCategoricalType>::PolarsPhysical>, PolarsError>

Available on crate feature dtype-categorical only.
Source

pub fn cat8( &self, ) -> Result<&Logical<Categorical8Type, <Categorical8Type as PolarsCategoricalType>::PolarsPhysical>, PolarsError>

Available on crate feature dtype-categorical only.

Unpack to ChunkedArray of dtype DataType::Categorical or DataType::Enum with a physical type of UInt8.

Source

pub fn cat16( &self, ) -> Result<&Logical<Categorical16Type, <Categorical16Type as PolarsCategoricalType>::PolarsPhysical>, PolarsError>

Available on crate feature dtype-categorical only.

Unpack to ChunkedArray of dtype DataType::Categorical or DataType::Enum with a physical type of UInt16.

Source

pub fn cat32( &self, ) -> Result<&Logical<Categorical32Type, <Categorical32Type as PolarsCategoricalType>::PolarsPhysical>, PolarsError>

Available on crate feature dtype-categorical only.

Unpack to ChunkedArray of dtype DataType::Categorical or DataType::Enum with a physical type of UInt32.

Source

pub fn struct_(&self) -> Result<&ChunkedArray<StructType>, PolarsError>

Available on crate feature dtype-struct only.

Unpack to ChunkedArray of dtype DataType::Struct

Source

pub fn map(&self) -> Result<&MapChunked, PolarsError>

Available on crate feature dtype-map only.

Unpack to MapChunked of dtype DataType::Map.

Source

pub fn null(&self) -> Result<&NullChunked, PolarsError>

Unpack to ChunkedArray of dtype DataType::Null

Source

pub fn extend_constant( &self, value: AnyValue<'_>, n: usize, ) -> Result<Series, PolarsError>

Extend with a constant value.

Source

pub fn try_from_physical(&self, dtype: &DataType) -> Result<Series, PolarsError>

Restore dtype from its physical representation with safety and Arrow import checks. Safe counterpart of Series::from_physical_unchecked.

  • Map: validate and canonicalize storage before constructing the Map.
  • Categorical / Enum: every code must name a category.
  • Decimal: validate the precision and scale, and that the values fit.
  • Object, Unknown: reject reconstruction.
  • Temporal types: no per-value checks, matching Arrow import. Out-of-range Time values may fail during formatting.

Errors for unsupported dtypes.

Source

pub fn get_leaf_array(&self) -> Series

Recurse nested types until we are at the leaf array.

Source

pub fn list_offsets_and_validities_recursive( &self, ) -> (Vec<OffsetsBuffer<i64>>, Vec<Option<Bitmap>>)

TODO: Move this somewhere else?

Source

pub fn to_unit_list(&self) -> ChunkedArray<ListType>

Wrap each element of this Series in a single-element list. A Series [1, 2, 3] becomes [[1], [2], [3]].

Source

pub fn implode(&self) -> Result<ChunkedArray<ListType>, PolarsError>

Convert the values of this Series to a ListChunked with a length of 1, so a Series of [1, 2, 3] becomes [[1, 2, 3]].

Source

pub fn reshape_array( &self, dimensions: &[ReshapeDimension], ) -> Result<Series, PolarsError>

Available on crate feature dtype-array only.
Source

pub fn reshape_list( &self, dimensions: &[ReshapeDimension], ) -> Result<Series, PolarsError>

Source

pub fn clear(&self) -> Series

Source

pub fn array_ref(&self, chunk_idx: usize) -> &Box<dyn Array>

Returns a reference to the Arrow ArrayRef

Source

pub fn select_chunk(&self, i: usize) -> Series

Source

pub fn is_sorted_flag(&self) -> IsSorted

Source

pub fn get_flags(&self) -> StatisticsFlags

Source

pub fn broadcast_to( &self, length: usize, ) -> Result<Cow<'_, Series>, PolarsError>

Returns a series with the given length.

Errors if this series’ length is not 1 and also not equal to the requested length.

Source

pub fn sort(&self, sort_options: SortOptions) -> Result<Series, PolarsError>

Sort the series with specific options.

§Example
let s = Series::new("foo".into(), [2, 1, 3]);
let sorted = s.sort(SortOptions::default())?;
assert_eq!(sorted, Series::new("foo".into(), [1, 2, 3]));
}

See SortOptions for more options.

Source

pub fn cast(&self, dtype: &DataType) -> Result<Series, PolarsError>

Source

pub fn cast_with_options( &self, dtype: &DataType, options: CastOptions, ) -> Result<Series, PolarsError>

Cast Series to another DataType.

Source

pub unsafe fn cast_unchecked( &self, dtype: &DataType, ) -> Result<Series, PolarsError>

Cast from physical to logical types without any checks on the validity of the cast.

§Safety

This can lead to invalid memory access in downstream code.

Source

pub unsafe fn from_physical_unchecked( &self, dtype: &DataType, ) -> Result<Series, PolarsError>

Convert a non-logical series back into a logical series without casting.

§Safety

Payloads must be safe to read as dtype: categorical codes in range for every non-null slot, and Maps satisfying the MapChunked storage safety contract. Null Map rows may span entries, and those entries may themselves be null; they are left alone. Null entries or keys in live rows are errors. Unsafe payloads can cause invalid memory access downstream.

§Key uniqueness

Not required for safety. Whole-row transformations preserve existing uniqueness; key-changing transformations must use validated construction.

Source

pub fn to_float(&self) -> Result<Series, PolarsError>

Cast numerical types to f64, and keep floats as is.

Source

pub fn sum<T>(&self) -> Result<T, PolarsError>
where T: NumCast + IsFloat,

Get the sum of the Series as a Scalar. Returns a Scalar with a zeroed value if self is an empty numeric series.

If the DataType is one of {Int8, UInt8, Int16, UInt16} the sum is computed in an Int64 accumulator and the result is returned as Int64 to prevent overflow issues.

Source

pub fn min<T>(&self) -> Result<Option<T>, PolarsError>
where T: NumCast + IsFloat,

Returns the minimum value in the array, according to the natural order. Returns an option because the array is nullable.

Source

pub fn max<T>(&self) -> Result<Option<T>, PolarsError>
where T: NumCast + IsFloat,

Returns the maximum value in the array, according to the natural order. Returns an option because the array is nullable.

Source

pub fn explode(&self, options: ExplodeOptions) -> Result<Series, PolarsError>

Explode a list Series. This expands every item to a new row..

Source

pub fn is_nan(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>

Check if numeric value is NaN (note this is different than missing/ null)

Source

pub fn is_not_nan(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>

Check if numeric value is NaN (note this is different than missing/null)

Source

pub fn is_finite(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>

Check if numeric value is finite

Source

pub fn is_infinite(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>

Check if numeric value is infinite

Source

pub fn zip_with( &self, mask: &ChunkedArray<BooleanType>, other: &Series, ) -> Result<Series, PolarsError>

Available on crate feature zip_with only.

Create a new ChunkedArray with values from self where the mask evaluates true and values from other where the mask evaluates false. This function automatically broadcasts unit length inputs.

Source

pub fn to_physical_repr(&self) -> Cow<'_, Series>

Converts a Series to their physical representation, if they have one, otherwise the series is left unchanged.

  • Date -> Int32
  • Datetime -> Int64
  • Duration -> Int64
  • Decimal -> Int128
  • Time -> Int64
  • Categorical -> U8/U16/U32
  • List(inner) -> List(physical of inner)
  • Array(inner) -> Array(physical of inner)
  • Struct -> Struct with physical repr of each struct column
  • Extension -> physical of storage type
Source

pub fn to_storage(&self) -> &Series

If the Series is an Extension type, return its storage Series. Otherwise, return itself.

Source

pub fn gather_every( &self, n: usize, offset: usize, ) -> Result<Series, PolarsError>

Traverse and collect every nth element in a new array.

Source

pub fn sum_reduce(&self) -> Result<Scalar, PolarsError>

Get the sum of the ChunkedArray as a Scalar. Returns a Scalar with a single zeroed value if self is an empty numeric series.

If the DataType is one of {Int8, UInt8, Int16, UInt16} the sum is computed in an Int64 accumulator and the result is returned as Int64 to prevent overflow issues.

Source

pub fn mean_reduce(&self) -> Result<Scalar, PolarsError>

Get the mean of the Series as a new Series of length 1. Returns a Series with a single null entry if self is an empty numeric series.

Source

pub fn product(&self) -> Result<Scalar, PolarsError>

Get the product of an array.

If the DataType is one of {Int8, UInt8, Int16, UInt16} the Series is first cast to Int64 to prevent overflow issues.

Source

pub fn strict_cast(&self, dtype: &DataType) -> Result<Series, PolarsError>

Cast throws an error if conversion had overflows

Source

pub fn str_value(&self, index: usize) -> Result<Cow<'_, str>, PolarsError>

Source

pub fn head(&self, length: Option<usize>) -> Series

Get the head of the Series.

Source

pub fn tail(&self, length: Option<usize>) -> Series

Get the tail of the Series.

Source

pub fn unique_stable(&self) -> Result<Series, PolarsError>

Compute the unique elements, but maintain order. This requires more work than a naive Series::unique.

Source

pub fn try_idx(&self) -> Option<&ChunkedArray<UInt32Type>>

Source

pub fn idx(&self) -> Result<&ChunkedArray<UInt32Type>, PolarsError>

Source

pub fn estimated_size(&self) -> usize

Returns an estimation of the total (heap) allocated size of the Series in bytes.

§Implementation

This estimation is the sum of the size of its buffers, validity, including nested arrays. Multiple arrays may share buffers and bitmaps. Therefore, the size of 2 arrays is not the sum of the sizes computed from this function. In particular, StructArray’s size is an upper bound.

When an array is sliced, its allocated size remains constant because the buffer unchanged. However, this function will yield a smaller number. This is because this function returns the visible size of the buffer, not its total capacity.

FFI buffers are included in this estimation.

Source

pub fn row_encode_unordered( &self, ) -> Result<ChunkedArray<BinaryOffsetType>, PolarsError>

Source

pub fn row_encode_ordered( &self, descending: bool, nulls_last: bool, ) -> Result<ChunkedArray<BinaryOffsetType>, PolarsError>

Source

pub fn equals(&self, other: &Series) -> bool

Check if series are equal. Note that None == None evaluates to false

Source

pub fn equals_missing(&self, other: &Series) -> bool

Check if all values in series are equal where None == None evaluates to true.

Methods from Deref<Target = dyn SeriesTrait>§

Trait Implementations§

Source§

impl Clone for Breaks

Source§

fn clone(&self) -> Breaks

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Breaks

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Deref for Breaks

Source§

type Target = Series

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Breaks as Deref>::Target

Dereferences the value.
Source§

impl<'de> Deserialize<'de> for Breaks

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Breaks, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Hash for Breaks

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Breaks

Source§

fn eq(&self, other: &Breaks) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Breaks

Source§

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
Source§

impl StructuralPartialEq for Breaks

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Key for T
where T: Clone,

Source§

fn align() -> usize

The alignment necessary for the key. Must return a power of two.
Source§

fn size(&self) -> usize

The size of the key in bytes.
Source§

unsafe fn init(&self, ptr: *mut u8)

Initialize the key in the given memory location. Read more
Source§

unsafe fn get<'a>(ptr: *const u8) -> &'a T

Get a reference to the key from the given memory location. Read more
Source§

unsafe fn drop_in_place(ptr: *mut u8)

Drop the key in place. Read more
§

impl<T> PlanCallbackArgs for T

§

impl<T> PlanCallbackOut for T

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more