polars::datatypes

Struct Logical

Source
pub struct Logical<Logical, Physical>(pub ChunkedArray<Physical>, _, pub Option<DataType>)
where
    Logical: PolarsDataType,
    Physical: PolarsDataType;
Expand description

Maps a logical type to a chunked array implementation of the physical type. This saves a lot of compiler bloat and allows us to reuse functionality.

Tuple Fields§

§0: ChunkedArray<Physical>§2: Option<DataType>

Implementations§

Source§

impl Logical<DecimalType, Int128Type>

Source

pub fn precision(&self) -> Option<usize>

Source

pub fn scale(&self) -> usize

Source

pub fn to_scale( &self, scale: usize, ) -> Result<Cow<'_, Logical<DecimalType, Int128Type>>, PolarsError>

Source§

impl<K, T> Logical<K, T>

Source

pub fn new_logical<J>(ca: ChunkedArray<T>) -> Logical<J, T>
where J: PolarsDataType,

Source§

impl<K, T> Logical<K, T>

Source

pub fn physical(&self) -> &ChunkedArray<T>

Source

pub fn field(&self) -> Field

Source§

impl Logical<DateType, Int32Type>

Source

pub fn as_date_iter(&self) -> impl TrustedLen

Source

pub fn from_naive_date<I>( name: PlSmallStr, v: I, ) -> Logical<DateType, Int32Type>
where I: IntoIterator<Item = NaiveDate>,

Construct a new DateChunked from an iterator over NaiveDate.

Source

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

Convert from Date into String with the given format. See chrono strftime/strptime.

Source

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

Convert from Date into String with the given format. See chrono strftime/strptime.

Alias for to_string.

Source

pub fn from_naive_date_options<I>( name: PlSmallStr, v: I, ) -> Logical<DateType, Int32Type>
where I: IntoIterator<Item = Option<NaiveDate>>,

Construct a new DateChunked from an iterator over optional NaiveDate.

Source§

impl Logical<DatetimeType, Int64Type>

Source

pub fn as_datetime_iter(&self) -> impl TrustedLen

Source

pub fn time_unit(&self) -> TimeUnit

Source

pub fn time_zone(&self) -> &Option<PlSmallStr>

Source

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

Convert from Datetime into String with the given format. See chrono strftime/strptime.

Source

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

Convert from Datetime into String with the given format. See chrono strftime/strptime.

Alias for to_string.

Source

pub fn from_naive_datetime<I>( name: PlSmallStr, v: I, tu: TimeUnit, ) -> Logical<DatetimeType, Int64Type>
where I: IntoIterator<Item = NaiveDateTime>,

Construct a new DatetimeChunked from an iterator over NaiveDateTime.

Source

pub fn from_naive_datetime_options<I>( name: PlSmallStr, v: I, tu: TimeUnit, ) -> Logical<DatetimeType, Int64Type>
where I: IntoIterator<Item = Option<NaiveDateTime>>,

Source

pub fn cast_time_unit(&self, tu: TimeUnit) -> Logical<DatetimeType, Int64Type>

Change the underlying TimeUnit. And update the data accordingly.

Source

pub fn set_time_unit(&mut self, time_unit: TimeUnit)

Change the underlying TimeUnit. This does not modify the data.

Source

pub fn set_time_zone( &mut self, time_zone: PlSmallStr, ) -> Result<(), PolarsError>

Available on crate feature timezones only.

Change the underlying TimeZone. This does not modify the data. This does not validate the time zone - it’s up to the caller to verify that it’s already been validated.

Source

pub fn set_time_unit_and_time_zone( &mut self, time_unit: TimeUnit, time_zone: PlSmallStr, ) -> Result<(), PolarsError>

Available on crate feature timezones only.

Change the underlying TimeUnit and TimeZone. This does not modify the data. This does not validate the time zone - it’s up to the caller to verify that it’s already been validated.

Source§

impl Logical<DurationType, Int64Type>

Source

pub fn time_unit(&self) -> TimeUnit

Source

pub fn cast_time_unit(&self, tu: TimeUnit) -> Logical<DurationType, Int64Type>

Change the underlying TimeUnit. And update the data accordingly.

Source

pub fn set_time_unit(&mut self, tu: TimeUnit)

Change the underlying TimeUnit. This does not modify the data.

Source

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

Convert from Duration to String; note that strftime format strings are not supported, only the specifiers ‘iso’ and ‘polars’.

Source

pub fn from_duration<I>( name: PlSmallStr, v: I, tu: TimeUnit, ) -> Logical<DurationType, Int64Type>
where I: IntoIterator<Item = TimeDelta>,

Construct a new DurationChunked from an iterator over ChronoDuration.

Source

pub fn from_duration_options<I>( name: PlSmallStr, v: I, tu: TimeUnit, ) -> Logical<DurationType, Int64Type>
where I: IntoIterator<Item = Option<TimeDelta>>,

Construct a new DurationChunked from an iterator over optional ChronoDuration.

Source§

impl Logical<TimeType, Int64Type>

Source

pub fn to_string(&self, format: &str) -> ChunkedArray<StringType>

Convert from Time into String with the given format. See chrono strftime/strptime.

Source

pub fn strftime(&self, format: &str) -> ChunkedArray<StringType>

Convert from Time into String with the given format. See chrono strftime/strptime.

Alias for to_string.

Source

pub fn as_time_iter(&self) -> impl TrustedLen

Source

pub fn from_naive_time<I>( name: PlSmallStr, v: I, ) -> Logical<TimeType, Int64Type>
where I: IntoIterator<Item = NaiveTime>,

Construct a new TimeChunked from an iterator over NaiveTime.

Source

pub fn from_naive_time_options<I>( name: PlSmallStr, v: I, ) -> Logical<TimeType, Int64Type>
where I: IntoIterator<Item = Option<NaiveTime>>,

Construct a new TimeChunked from an iterator over optional NaiveTime.

Methods from Deref<Target = ChunkedArray<T>>§

Source

pub fn sum(&self) -> Option<u32>

Source

pub fn min(&self) -> Option<bool>

Source

pub fn max(&self) -> Option<bool>

Source

pub fn mean(&self) -> Option<f64>

Source

pub fn max_binary(&self) -> Option<&[u8]>

Source

pub fn min_binary(&self) -> Option<&[u8]>

Source

pub fn append(&mut self, other: &ChunkedArray<T>) -> Result<(), PolarsError>

Append in place. This is done by adding the chunks of other to this ChunkedArray.

See also extend for appends to the underlying memory

Source

pub fn apply_nonnull_values_generic<'a, U, K, F>( &'a self, dtype: DataType, op: F, ) -> ChunkedArray<U>

Applies a function only to the non-null elements, propagating nulls.

Source

pub fn try_apply_nonnull_values_generic<'a, U, K, F, E>( &'a self, op: F, ) -> Result<ChunkedArray<U>, E>

Applies a function only to the non-null elements, propagating nulls.

Source

pub fn apply_into_string_amortized<'a, F>( &'a self, f: F, ) -> ChunkedArray<StringType>
where F: FnMut(<T as PolarsDataType>::Physical<'a>, &mut String),

Source

pub fn try_apply_into_string_amortized<'a, F, E>( &'a self, f: F, ) -> Result<ChunkedArray<StringType>, E>
where F: FnMut(<T as PolarsDataType>::Physical<'a>, &mut String) -> Result<(), E>,

Source

pub fn cast_and_apply_in_place<F, S>(&self, f: F) -> ChunkedArray<S>

Cast a numeric array to another numeric data type and apply a function in place. This saves an allocation.

Source

pub fn apply_mut<F>(&mut self, f: F)
where F: Fn(<T as PolarsNumericType>::Native) -> <T as PolarsNumericType>::Native + Copy,

Source

pub fn apply_mut<'a, F>(&'a self, f: F) -> ChunkedArray<StringType>
where F: FnMut(&'a str) -> &'a str,

Source

pub fn apply_mut<'a, F>(&'a self, f: F) -> ChunkedArray<BinaryType>
where F: FnMut(&'a [u8]) -> &'a [u8],

Source

pub unsafe fn apply_views<F>(&self, update_view: F) -> ChunkedArray<StringType>
where F: FnMut(View, &str) -> View + Copy,

§Safety

Update the views. All invariants of the views apply.

Source

pub fn apply_as_ints<F>(&self, f: F) -> Series
where F: Fn(&Series) -> Series,

Source

pub fn apply_as_ints<F>(&self, f: F) -> Series
where F: Fn(&Series) -> Series,

Source

pub fn num_trues(&self) -> usize

Source

pub fn num_falses(&self) -> usize

Source

pub fn len(&self) -> usize

Get the length of the ChunkedArray

Source

pub fn null_count(&self) -> usize

Return the number of null values in the ChunkedArray.

Source

pub unsafe fn set_null_count(&mut self, null_count: u32)

Set the null count directly.

This can be useful after mutably adjusting the validity of the underlying arrays.

§Safety

The new null count must match the total null count of the underlying arrays.

Source

pub fn is_empty(&self) -> bool

Check if ChunkedArray is empty.

Source

pub fn rechunk(&self) -> ChunkedArray<T>

Source

pub fn rechunk_validity(&self) -> Option<Bitmap>

Source

pub fn split_at(&self, offset: i64) -> (ChunkedArray<T>, ChunkedArray<T>)

Split the array. The chunks are reallocated the underlying data slices are zero copy.

When offset is negative it will be counted from the end of the array. This method will never error, and will slice the best match when offset, or length is out of bounds

Source

pub fn slice(&self, offset: i64, length: usize) -> ChunkedArray<T>

Slice the array. The chunks are reallocated the underlying data slices are zero copy.

When offset is negative it will be counted from the end of the array. This method will never error, and will slice the best match when offset, or length is out of bounds

Source

pub fn limit(&self, num_elements: usize) -> ChunkedArray<T>
where ChunkedArray<T>: Sized,

Take a view of top n elements

Source

pub fn head(&self, length: Option<usize>) -> ChunkedArray<T>
where ChunkedArray<T>: Sized,

Get the head of the ChunkedArray

Source

pub fn tail(&self, length: Option<usize>) -> ChunkedArray<T>
where ChunkedArray<T>: Sized,

Get the tail of the ChunkedArray

Source

pub fn prune_empty_chunks(&mut self)

Remove empty chunks.

Source

pub fn to_decimal(&self, infer_length: usize) -> Result<Series, PolarsError>

Convert an StringChunked to a Series of DataType::Decimal. Scale needed for the decimal type are inferred. Parsing is not strict.
Scale inference assumes that all tested strings are well-formed numbers, and may produce unexpected results for scale if this is not the case.

If the decimal precision and scale are already known, consider using the cast method.

Source

pub fn extend(&mut self, other: &ChunkedArray<T>) -> Result<(), PolarsError>

Extend the memory backed by this array with the values from other.

Different from ChunkedArray::append which adds chunks to this ChunkedArray extend appends the data from other to the underlying PrimitiveArray and thus may cause a reallocation.

However if this does not cause a reallocation, the resulting data structure will not have any extra chunks and thus will yield faster queries.

Prefer extend over append when you want to do a query after a single append. For instance during online operations where you add n rows and rerun a query.

Prefer append over extend when you want to append many times before doing a query. For instance when you read in multiple files and when to store them in a single DataFrame. In the latter case finish the sequence of append operations with a rechunk.

Source

pub fn for_each<'a, F>(&'a self, op: F)
where F: FnMut(Option<<T as PolarsDataType>::Physical<'a>>),

Source

pub fn is_null(&self) -> ChunkedArray<BooleanType>

Get a mask of the null values.

Source

pub fn is_not_null(&self) -> ChunkedArray<BooleanType>

Get a mask of the valid values.

Source

pub fn rolling_map_float<F>( &self, window_size: usize, f: F, ) -> Result<ChunkedArray<T>, PolarsError>
where F: FnMut(&mut ChunkedArray<T>) -> Option<<T as PolarsNumericType>::Native>,

Apply a rolling custom function. This is pretty slow because of dynamic dispatch.

Source

pub unsafe fn to_string_unchecked(&self) -> ChunkedArray<StringType>

§Safety

String is not validated

Source

pub fn as_binary(&self) -> ChunkedArray<BinaryType>

Source

pub fn any(&self) -> bool

Returns whether any of the values in the column are true.

Null values are ignored.

Source

pub fn all(&self) -> bool

Returns whether all values in the array are true.

Null values are ignored.

Source

pub fn any_kleene(&self) -> Option<bool>

Returns whether any of the values in the column are true.

The output is unknown (None) if the array contains any null values and no true values.

Source

pub fn all_kleene(&self) -> Option<bool>

Returns whether all values in the column are true.

The output is unknown (None) if the array contains any null values and no false values.

Source

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

Source

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

Source

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

Source

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

Source

pub fn none_to_nan(&self) -> ChunkedArray<T>

Convert missing values to NaN values.

Source

pub fn to_canonical(&self) -> ChunkedArray<T>

Source

pub fn par_iter(&self) -> impl ParallelIterator<Item = Option<Series>>

Source

pub fn par_iter_indexed(&mut self) -> impl IndexedParallelIterator

Source

pub fn par_iter_indexed(&self) -> impl IndexedParallelIterator

Source

pub fn par_iter(&self) -> impl ParallelIterator<Item = Option<&str>>

Source

pub fn iter(&self) -> impl PolarsIterator

Source

pub fn to_ndarray( &self, ) -> Result<ArrayBase<ViewRepr<&<T as PolarsNumericType>::Native>, Dim<[usize; 1]>>, PolarsError>

If data is aligned in a single chunk and has no Null values a zero copy view is returned as an ndarray

Source

pub fn to_ndarray<N>( &self, ) -> Result<ArrayBase<OwnedRepr<<N as PolarsNumericType>::Native>, Dim<[usize; 2]>>, PolarsError>

If all nested Series have the same length, a 2 dimensional ndarray::Array is returned.

Source

pub fn amortized_iter( &self, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<Box<dyn Array>>>>

This is an iterator over a ArrayChunked that save allocations. A Series is: 1. Arc<ChunkedArray> ChunkedArray is: 2. Vec< 3. ArrayRef>

The ArrayRef we indicated with 3. will be updated during iteration. The Series will be pinned in memory, saving an allocation for

  1. Arc<..>
  2. Vec<…>
§Warning

Though memory safe in the sense that it will not read unowned memory, UB, or memory leaks this function still needs precautions. The returned should never be cloned or taken longer than a single iteration, as every call on next of the iterator will change the contents of that Series.

§Safety

The lifetime of AmortSeries is bound to the iterator. Keeping it alive longer than the iterator is UB.

Source

pub fn amortized_iter_with_name( &self, name: PlSmallStr, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<Box<dyn Array>>>>

This is an iterator over a ArrayChunked that save allocations. A Series is: 1. Arc<ChunkedArray> ChunkedArray is: 2. Vec< 3. ArrayRef>

The ArrayRef we indicated with 3. will be updated during iteration. The Series will be pinned in memory, saving an allocation for

  1. Arc<..>
  2. Vec<…>

If the returned AmortSeries is cloned, the local copy will be replaced and a new container will be set.

Source

pub fn try_apply_amortized_to_list<F>( &self, f: F, ) -> Result<ChunkedArray<ListType>, PolarsError>

Source

pub unsafe fn apply_amortized_same_type<F>( &self, f: F, ) -> ChunkedArray<FixedSizeListType>
where F: FnMut(AmortSeries) -> Series,

Apply a closure F to each array.

§Safety

Return series of F must has the same dtype and number of elements as input.

Source

pub unsafe fn try_apply_amortized_same_type<F>( &self, f: F, ) -> Result<ChunkedArray<FixedSizeListType>, PolarsError>

Try apply a closure F to each array.

§Safety

Return series of F must has the same dtype and number of elements as input if it is Ok.

Source

pub unsafe fn zip_and_apply_amortized_same_type<'a, T, F>( &'a self, ca: &'a ChunkedArray<T>, f: F, ) -> ChunkedArray<FixedSizeListType>

Zip with a ChunkedArray then apply a binary function F elementwise.

§Safety
Source

pub fn apply_amortized_generic<F, K, V>(&self, f: F) -> ChunkedArray<V>

Apply a closure F elementwise.

Source

pub fn try_apply_amortized_generic<F, K, V>( &self, f: F, ) -> Result<ChunkedArray<V>, PolarsError>

Try apply a closure F elementwise.

Source

pub fn for_each_amortized<F>(&self, f: F)

Source

pub fn inner_dtype(&self) -> &DataType

Get the inner data type of the fixed size list.

Source

pub fn width(&self) -> usize

Source

pub unsafe fn to_logical(&mut self, inner_dtype: DataType)

§Safety

The caller must ensure that the logical type given fits the physical type of the array.

Source

pub fn get_inner(&self) -> Series

Get the inner values as Series

Source

pub fn apply_to_inner( &self, func: &dyn Fn(Series) -> Result<Series, PolarsError>, ) -> Result<ChunkedArray<FixedSizeListType>, PolarsError>

Ignore the list indices and apply func to the inner type as Series.

Source

pub fn get_leaf_array(&self) -> Series

Recurse nested types until we are at the leaf array.

Source

pub fn to_bytes_hashes<'a>( &'a self, multithreaded: bool, hb: RandomState, ) -> Vec<Vec<BytesHash<'a>>>

Source

pub unsafe fn with_chunks(&self, chunks: Vec<Box<dyn Array>>) -> ChunkedArray<T>

§Safety

The Arrow datatype of all chunks must match the PolarsDataType T.

Source

pub fn amortized_iter( &self, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<Box<dyn Array>>>>

This is an iterator over a ListChunked that saves allocations. A Series is: 1. Arc<ChunkedArray> ChunkedArray is: 2. Vec< 3. ArrayRef>

The ArrayRef we indicated with 3. will be updated during iteration. The Series will be pinned in memory, saving an allocation for

  1. Arc<..>
  2. Vec<…>

If the returned AmortSeries is cloned, the local copy will be replaced and a new container will be set.

Source

pub fn amortized_iter_with_name( &self, name: PlSmallStr, ) -> AmortizedListIter<'_, impl Iterator<Item = Option<Box<dyn Array>>>>

See amortized_iter.

Source

pub fn apply_amortized_generic<F, K, V>(&self, f: F) -> ChunkedArray<V>

Apply a closure F elementwise.

Source

pub fn try_apply_amortized_generic<F, K, V>( &self, f: F, ) -> Result<ChunkedArray<V>, PolarsError>

Source

pub fn for_each_amortized<F>(&self, f: F)

Source

pub fn zip_and_apply_amortized<'a, T, I, F>( &'a self, ca: &'a ChunkedArray<T>, f: F, ) -> ChunkedArray<ListType>
where T: PolarsDataType, &'a ChunkedArray<T>: IntoIterator<IntoIter = I>, I: TrustedLen<Item = Option<<T as PolarsDataType>::Physical<'a>>>, F: FnMut(Option<AmortSeries>, Option<<T as PolarsDataType>::Physical<'a>>) -> Option<Series>,

Zip with a ChunkedArray then apply a binary function F elementwise.

Source

pub fn binary_zip_and_apply_amortized<'a, T, U, F>( &'a self, ca1: &'a ChunkedArray<T>, ca2: &'a ChunkedArray<U>, f: F, ) -> ChunkedArray<ListType>

Source

pub fn try_zip_and_apply_amortized<'a, T, I, F>( &'a self, ca: &'a ChunkedArray<T>, f: F, ) -> Result<ChunkedArray<ListType>, PolarsError>
where T: PolarsDataType, &'a ChunkedArray<T>: IntoIterator<IntoIter = I>, I: TrustedLen<Item = Option<<T as PolarsDataType>::Physical<'a>>>, F: FnMut(Option<AmortSeries>, Option<<T as PolarsDataType>::Physical<'a>>) -> Result<Option<Series>, PolarsError>,

Source

pub fn apply_amortized<F>(&self, f: F) -> ChunkedArray<ListType>
where F: FnMut(AmortSeries) -> Series,

Apply a closure F elementwise.

Source

pub fn try_apply_amortized<F>( &self, f: F, ) -> Result<ChunkedArray<ListType>, PolarsError>

Source

pub fn inner_dtype(&self) -> &DataType

Get the inner data type of the list.

Source

pub fn set_inner_dtype(&mut self, dtype: DataType)

Source

pub fn set_fast_explode(&mut self)

Source

pub fn _can_fast_explode(&self) -> bool

Source

pub unsafe fn to_logical(&mut self, inner_dtype: DataType)

Set the logical type of the ListChunked.

§Safety

The caller must ensure that the logical type given fits the physical type of the array.

Source

pub fn get_inner(&self) -> Series

Get the inner values as Series, ignoring the list offsets.

Source

pub fn apply_to_inner( &self, func: &dyn Fn(Series) -> Result<Series, PolarsError>, ) -> Result<ChunkedArray<ListType>, PolarsError>

Ignore the list indices and apply func to the inner type as Series.

Source

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

Source

pub unsafe fn get_object_unchecked( &self, index: usize, ) -> Option<&(dyn PolarsObjectSafe + 'static)>

Get a hold to an object that can be formatted or downcasted via the Any trait.

§Safety

No bounds checks

Source

pub fn get_object( &self, index: usize, ) -> Option<&(dyn PolarsObjectSafe + 'static)>

Get a hold to an object that can be formatted or downcasted via the Any trait.

Source

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

Sample n datapoints from this ChunkedArray.

Source

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

Sample a fraction between 0.0-1.0 of this ChunkedArray.

Source

pub fn struct_fields(&self) -> &[Field]

Source

pub fn fields_as_series(&self) -> Vec<Series>

Source

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

Source

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

Source

pub fn _apply_fields<F>( &self, func: F, ) -> Result<ChunkedArray<StructType>, PolarsError>
where F: FnMut(&Series) -> Series,

Source

pub fn try_apply_fields<F>( &self, func: F, ) -> Result<ChunkedArray<StructType>, PolarsError>

Source

pub fn get_row_encoded_array( &self, options: SortOptions, ) -> Result<BinaryArray<i64>, PolarsError>

Source

pub fn get_row_encoded( &self, options: SortOptions, ) -> Result<ChunkedArray<BinaryOffsetType>, PolarsError>

Source

pub fn zip_outer_validity(&mut self, other: &ChunkedArray<StructType>)

Combine the validities of two structs.

Source

pub fn field_by_name(&self, name: &str) -> Result<Series, PolarsError>

Get access to one of this StructChunked’s fields

Source

pub fn to_vec(&self) -> Vec<Option<<T as PolarsNumericType>::Native>>

Convert to a Vec of Option<T::Native>.

Source

pub fn to_vec_null_aware( &self, ) -> Either<Vec<<T as PolarsNumericType>::Native>, Vec<Option<<T as PolarsNumericType>::Native>>>

Convert to a Vec but don’t return Option<T::Native> if there are no null values

Source

pub fn metadata_dyn(&self) -> Option<RwLockReadGuard<'_, dyn MetadataTrait>>

Attempt to get a reference to the trait object containing the ChunkedArray’s Metadata

This fails if there is a need to block.

Source

pub fn boxed_metadata_dyn<'a>(&'a self) -> Box<dyn MetadataTrait + 'a>

Attempt to get a reference to the trait object containing the ChunkedArray’s Metadata

This fails if there is a need to block.

Source

pub fn metadata(&self) -> MetadataReadGuard<'_, T>

Get a guard to read the ChunkedArray’s Metadata

Source

pub fn interior_mut_metadata(&self) -> RwLockWriteGuard<'_, Metadata<T>>

Get a guard to read/write the ChunkedArray’s Metadata

Source

pub fn metadata_arc(&self) -> &Arc<IMMetadata<T>>

Get a reference to Arc that contains the ChunkedArray’s Metadata

Source

pub fn metadata_owned_arc(&self) -> Arc<IMMetadata<T>>

Get a Arc that contains the ChunkedArray’s Metadata

Source

pub fn metadata_mut(&mut self) -> &mut Arc<IMMetadata<T>>

Get a mutable reference to the Arc that contains the ChunkedArray’s Metadata

Source

pub fn unset_fast_explode_list(&mut self)

Source

pub fn set_fast_explode_list(&mut self, value: bool)

Source

pub fn get_fast_explode_list(&self) -> bool

Source

pub fn get_flags(&self) -> MetadataFlags

Source

pub fn is_sorted_flag(&self) -> IsSorted

Source

pub fn set_sorted_flag(&mut self, sorted: IsSorted)

Set the ‘sorted’ bit meta info.

Source

pub fn with_sorted_flag(&self, sorted: IsSorted) -> ChunkedArray<T>

Set the ‘sorted’ bit meta info.

Source

pub fn get_min_value(&self) -> Option<<T as PolarsDataType>::OwnedPhysical>

Source

pub fn get_max_value(&self) -> Option<<T as PolarsDataType>::OwnedPhysical>

Source

pub fn get_distinct_count(&self) -> Option<u32>

Source

pub fn merge_metadata(&mut self, md: Metadata<T>)

Source

pub fn copy_metadata_cast<O>( &mut self, other: &ChunkedArray<O>, props: MetadataProperties, )
where O: PolarsDataType,

Copies Metadata properties specified by props from other with different underlying PolarsDataType into self.

This does not copy the properties with a different type between the Metadatas (e.g. min_value and max_value) and will panic on debug builds if that is attempted.

Source

pub fn copy_metadata( &mut self, other: &ChunkedArray<T>, props: MetadataProperties, )

Copies Metadata properties specified by props from other into self.

Source

pub fn first_non_null(&self) -> Option<usize>

Get the index of the first non null value in this ChunkedArray.

Source

pub fn last_non_null(&self) -> Option<usize>

Get the index of the last non null value in this ChunkedArray.

Source

pub fn drop_nulls(&self) -> ChunkedArray<T>

Source

pub fn iter_validities( &self, ) -> Map<Iter<'_, Box<dyn Array>>, fn(_: &Box<dyn Array>) -> Option<&Bitmap>>

Get the buffer of bits representing null values

Source

pub fn has_nulls(&self) -> bool

Return if any the chunks in this ChunkedArray have nulls.

Source

pub fn shrink_to_fit(&mut self)

Shrink the capacity of this array to fit its length.

Source

pub fn clear(&self) -> ChunkedArray<T>

Source

pub fn unpack_series_matching_type( &self, series: &Series, ) -> Result<&ChunkedArray<T>, PolarsError>

Series to ChunkedArray<T>

Source

pub fn chunk_lengths( &self, ) -> Map<Iter<'_, Box<dyn Array>>, fn(_: &Box<dyn Array>) -> usize>

Returns an iterator over the lengths of the chunks of the array.

Source

pub fn chunks(&self) -> &Vec<Box<dyn Array>>

A reference to the chunks

Source

pub unsafe fn chunks_mut(&mut self) -> &mut Vec<Box<dyn Array>>

A mutable reference to the chunks

§Safety

The caller must ensure to not change the DataType or length of any of the chunks. And the null_count remains correct.

Source

pub fn is_optimal_aligned(&self) -> bool

Returns true if contains a single chunk and has no null values

Source

pub fn dtype(&self) -> &DataType

Get data type of ChunkedArray.

Source

pub fn name(&self) -> &PlSmallStr

Name of the ChunkedArray.

Source

pub fn ref_field(&self) -> &Field

Get a reference to the field.

Source

pub fn rename(&mut self, name: PlSmallStr)

Rename this ChunkedArray.

Source

pub fn get(&self, idx: usize) -> Option<<T as PolarsDataType>::Physical<'_>>

Get a single value from this ChunkedArray. If the return values is None this indicates a NULL value.

§Panics

This function will panic if idx is out of bounds.

Source

pub unsafe fn get_unchecked( &self, idx: usize, ) -> Option<<T as PolarsDataType>::Physical<'_>>

Get a single value from this ChunkedArray. If the return values is None this indicates a NULL value.

§Safety

It is the callers responsibility that the idx < self.len().

Source

pub unsafe fn value_unchecked( &self, idx: usize, ) -> <T as PolarsDataType>::Physical<'_>

Get a single value from this ChunkedArray. Null values are ignored and the returned value could be garbage if it was masked out by NULL. Note that the value always is initialized.

§Safety

It is the callers responsibility that the idx < self.len().

Source

pub fn first(&self) -> Option<<T as PolarsDataType>::Physical<'_>>

Source

pub fn last(&self) -> Option<<T as PolarsDataType>::Physical<'_>>

Source

pub fn get_as_series(&self, idx: usize) -> Option<Series>

Source

pub fn get_as_series(&self, idx: usize) -> Option<Series>

Available on crate feature dtype-array only.
Source

pub fn layout(&self) -> ChunkedArrayLayout<'_, T>

Source

pub fn cont_slice( &self, ) -> Result<&[<T as PolarsNumericType>::Native], PolarsError>

Returns the values of the array as a contiguous slice.

Source

pub fn data_views(&self) -> impl DoubleEndedIterator

Get slices of the underlying arrow data. NOTE: null values should be taken into account by the user of these slices as they are handled separately

Source

pub fn into_no_null_iter( &self, ) -> impl Send + Sync + ExactSizeIterator + DoubleEndedIterator + TrustedLen

Source

pub unsafe fn group_tuples_perfect( &self, num_groups: usize, multithreaded: bool, group_capacity: usize, ) -> GroupsProxy

Use the indexes as perfect groups.

§Safety

This ChunkedArray must contain each value in [0..num_groups) at least once, and nothing outside this range.

Source

pub fn lhs_sub<N>(&self, lhs: N) -> ChunkedArray<T>
where N: Num + NumCast,

Apply lhs - self

Source

pub fn lhs_div<N>(&self, lhs: N) -> ChunkedArray<T>
where N: Num + NumCast,

Apply lhs / self

Source

pub fn lhs_rem<N>(&self, lhs: N) -> ChunkedArray<T>
where N: Num + NumCast,

Apply lhs % self

Trait Implementations§

Source§

impl Add for &Logical<DecimalType, Int128Type>

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the + operator.
Source§

fn add( self, rhs: &Logical<DecimalType, Int128Type>, ) -> <&Logical<DecimalType, Int128Type> as Add>::Output

Performs the + operation. Read more
Source§

impl<K, T> Clone for Logical<K, T>

Source§

fn clone(&self) -> Logical<K, T>

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl DateMethods for Logical<DateType, Int32Type>

Source§

fn parse_from_str_slice( name: PlSmallStr, v: &[&str], fmt: &str, ) -> Logical<DateType, Int32Type>

Source§

fn year(&self) -> ChunkedArray<Int32Type>

Extract month from underlying NaiveDate representation. Returns the year number in the calendar date.
Source§

fn is_leap_year(&self) -> ChunkedArray<BooleanType>

Extract year from underlying NaiveDate representation. Returns whether the year is a leap year.
Source§

fn iso_year(&self) -> ChunkedArray<Int32Type>

This year number might not match the calendar year number.
Source§

fn quarter(&self) -> ChunkedArray<Int8Type>

Extract month from underlying NaiveDateTime representation. Quarters range from 1 to 4.
Source§

fn month(&self) -> ChunkedArray<Int8Type>

Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1. Read more
Source§

fn week(&self) -> ChunkedArray<Int8Type>

Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
Source§

fn day(&self) -> ChunkedArray<Int8Type>

Extract day from underlying NaiveDate representation. Returns the day of month starting from 1. Read more
Source§

fn ordinal(&self) -> ChunkedArray<Int16Type>

Returns the day of year starting from 1. Read more
Source§

impl DatetimeMethods for Logical<DatetimeType, Int64Type>

Source§

fn year(&self) -> ChunkedArray<Int32Type>

Extract month from underlying NaiveDateTime representation. Returns the year number in the calendar date.
Source§

fn is_leap_year(&self) -> ChunkedArray<BooleanType>

Extract year from underlying NaiveDate representation. Returns whether the year is a leap year.
Source§

fn iso_year(&self) -> ChunkedArray<Int32Type>

Source§

fn quarter(&self) -> ChunkedArray<Int8Type>

Extract quarter from underlying NaiveDateTime representation. Quarters range from 1 to 4.
Source§

fn month(&self) -> ChunkedArray<Int8Type>

Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1. Read more
Source§

fn weekday(&self) -> ChunkedArray<Int8Type>

Extract ISO weekday from underlying NaiveDateTime representation. Returns the weekday number where monday = 1 and sunday = 7
Source§

fn week(&self) -> ChunkedArray<Int8Type>

Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
Source§

fn day(&self) -> ChunkedArray<Int8Type>

Extract day from underlying NaiveDateTime representation. Returns the day of month starting from 1. Read more
Source§

fn hour(&self) -> ChunkedArray<Int8Type>

Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.
Source§

fn minute(&self) -> ChunkedArray<Int8Type>

Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.
Source§

fn second(&self) -> ChunkedArray<Int8Type>

Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.
Source§

fn nanosecond(&self) -> ChunkedArray<Int32Type>

Extract second from underlying NaiveDateTime representation. Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second.
Source§

fn ordinal(&self) -> ChunkedArray<Int16Type>

Returns the day of year starting from 1. Read more
Source§

fn parse_from_str_slice( name: PlSmallStr, v: &[&str], fmt: &str, tu: TimeUnit, ) -> Logical<DatetimeType, Int64Type>

Source§

impl<K, T> Deref for Logical<K, T>

Source§

type Target = ChunkedArray<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Logical<K, T> as Deref>::Target

Dereferences the value.
Source§

impl<K, T> DerefMut for Logical<K, T>

Source§

fn deref_mut(&mut self) -> &mut <Logical<K, T> as Deref>::Target

Mutably dereferences the value.
Source§

impl Div for &Logical<DecimalType, Int128Type>

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the / operator.
Source§

fn div( self, rhs: &Logical<DecimalType, Int128Type>, ) -> <&Logical<DecimalType, Int128Type> as Div>::Output

Performs the / operation. Read more
Source§

impl DurationMethods for Logical<DurationType, Int64Type>

Source§

fn hours(&self) -> ChunkedArray<Int64Type>

Extract the hours from a Duration

Source§

fn days(&self) -> ChunkedArray<Int64Type>

Extract the days from a Duration

Source§

fn minutes(&self) -> ChunkedArray<Int64Type>

Extract the seconds from a Duration

Source§

fn seconds(&self) -> ChunkedArray<Int64Type>

Extract the seconds from a Duration

Source§

fn milliseconds(&self) -> ChunkedArray<Int64Type>

Extract the milliseconds from a Duration

Source§

fn microseconds(&self) -> ChunkedArray<Int64Type>

Extract the microseconds from a Duration

Source§

fn nanoseconds(&self) -> ChunkedArray<Int64Type>

Extract the nanoseconds from a Duration

Source§

impl From<ChunkedArray<Int32Type>> for Logical<DateType, Int32Type>

Source§

fn from(ca: ChunkedArray<Int32Type>) -> Logical<DateType, Int32Type>

Converts to this type from the input type.
Source§

impl From<ChunkedArray<Int64Type>> for Logical<TimeType, Int64Type>

Source§

fn from(ca: ChunkedArray<Int64Type>) -> Logical<TimeType, Int64Type>

Converts to this type from the input type.
Source§

impl From<Logical<DateType, Int32Type>> for Series

Available on crate feature dtype-date only.
Source§

fn from(a: Logical<DateType, Int32Type>) -> Series

Converts to this type from the input type.
Source§

impl From<Logical<DatetimeType, Int64Type>> for Series

Available on crate feature dtype-datetime only.
Source§

fn from(a: Logical<DatetimeType, Int64Type>) -> Series

Converts to this type from the input type.
Source§

impl From<Logical<DurationType, Int64Type>> for Series

Available on crate feature dtype-duration only.
Source§

fn from(a: Logical<DurationType, Int64Type>) -> Series

Converts to this type from the input type.
Source§

impl From<Logical<TimeType, Int64Type>> for Series

Available on crate feature dtype-time only.
Source§

fn from(a: Logical<TimeType, Int64Type>) -> Series

Converts to this type from the input type.
Source§

impl IntoSeries for Logical<DateType, Int32Type>

Source§

impl IntoSeries for Logical<DatetimeType, Int64Type>

Source§

impl IntoSeries for Logical<DecimalType, Int128Type>

Source§

impl IntoSeries for Logical<DurationType, Int64Type>

Source§

impl IntoSeries for Logical<TimeType, Int64Type>

Source§

impl LogicalType for Logical<DateType, Int32Type>

Source§

fn dtype(&self) -> &DataType

Get data type of ChunkedArray.
Source§

fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>

Source§

unsafe fn get_any_value_unchecked(&self, i: usize) -> AnyValue<'_>

Safety Read more
Source§

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

Source§

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

Source§

impl LogicalType for Logical<DatetimeType, Int64Type>

Source§

fn dtype(&self) -> &DataType

Get data type of ChunkedArray.
Source§

fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>

Source§

unsafe fn get_any_value_unchecked(&self, i: usize) -> AnyValue<'_>

Safety Read more
Source§

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

Source§

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

Source§

impl LogicalType for Logical<DecimalType, Int128Type>

Source§

fn dtype(&self) -> &DataType

Get data type of ChunkedArray.
Source§

fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>

Source§

unsafe fn get_any_value_unchecked(&self, i: usize) -> AnyValue<'_>

Safety Read more
Source§

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

Source§

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

Source§

impl LogicalType for Logical<DurationType, Int64Type>

Source§

fn dtype(&self) -> &DataType

Get data type of ChunkedArray.
Source§

fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>

Source§

unsafe fn get_any_value_unchecked(&self, i: usize) -> AnyValue<'_>

Safety Read more
Source§

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

Source§

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

Source§

impl LogicalType for Logical<TimeType, Int64Type>

Source§

fn dtype(&self) -> &'static DataType

Get data type of ChunkedArray.
Source§

fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>

Source§

unsafe fn get_any_value_unchecked(&self, i: usize) -> AnyValue<'_>

Safety Read more
Source§

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

Source§

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

Source§

impl Mul for &Logical<DecimalType, Int128Type>

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the * operator.
Source§

fn mul( self, rhs: &Logical<DecimalType, Int128Type>, ) -> <&Logical<DecimalType, Int128Type> as Mul>::Output

Performs the * operation. Read more
Source§

impl<T> NamedFrom<T, [NaiveDate]> for Logical<DateType, Int32Type>
where T: AsRef<[NaiveDate]>,

Available on crate feature dtype-date only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DateType, Int32Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [NaiveDateTime]> for Logical<DatetimeType, Int64Type>
where T: AsRef<[NaiveDateTime]>,

Available on crate feature dtype-datetime only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DatetimeType, Int64Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [NaiveTime]> for Logical<TimeType, Int64Type>
where T: AsRef<[NaiveTime]>,

Available on crate feature dtype-time only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<TimeType, Int64Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [Option<NaiveDate>]> for Logical<DateType, Int32Type>
where T: AsRef<[Option<NaiveDate>]>,

Available on crate feature dtype-date only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DateType, Int32Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [Option<NaiveDateTime>]> for Logical<DatetimeType, Int64Type>
where T: AsRef<[Option<NaiveDateTime>]>,

Available on crate feature dtype-datetime only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DatetimeType, Int64Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [Option<NaiveTime>]> for Logical<TimeType, Int64Type>
where T: AsRef<[Option<NaiveTime>]>,

Available on crate feature dtype-time only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<TimeType, Int64Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [Option<TimeDelta>]> for Logical<DurationType, Int64Type>
where T: AsRef<[Option<TimeDelta>]>,

Available on crate feature dtype-duration only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DurationType, Int64Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [TimeDelta]> for Logical<DurationType, Int64Type>
where T: AsRef<[TimeDelta]>,

Available on crate feature dtype-duration only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DurationType, Int64Type>

Initialize by name and values.
Source§

impl PolarsRound for Logical<DateType, Int32Type>

Source§

impl PolarsRound for Logical<DatetimeType, Int64Type>

Source§

impl PolarsTruncate for Logical<DateType, Int32Type>

Source§

impl PolarsTruncate for Logical<DatetimeType, Int64Type>

Source§

impl<K, T> Serialize for Logical<K, T>

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 Sub for &Logical<DecimalType, Int128Type>

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the - operator.
Source§

fn sub( self, rhs: &Logical<DecimalType, Int128Type>, ) -> <&Logical<DecimalType, Int128Type> as Sub>::Output

Performs the - operation. Read more
Source§

impl TimeMethods for Logical<TimeType, Int64Type>

Source§

fn hour(&self) -> ChunkedArray<Int8Type>

Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.

Source§

fn minute(&self) -> ChunkedArray<Int8Type>

Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.

Source§

fn second(&self) -> ChunkedArray<Int8Type>

Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.

Source§

fn nanosecond(&self) -> ChunkedArray<Int32Type>

Extract second from underlying NaiveDateTime representation. Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second.

Source§

fn parse_from_str_slice( name: PlSmallStr, v: &[&str], fmt: &str, ) -> Logical<TimeType, Int64Type>

Auto Trait Implementations§

§

impl<Logical, Physical> Freeze for Logical<Logical, Physical>

§

impl<Logical, Physical> !RefUnwindSafe for Logical<Logical, Physical>

§

impl<Logical, Physical> Send for Logical<Logical, Physical>

§

impl<Logical, Physical> Sync for Logical<Logical, Physical>

§

impl<Logical, Physical> Unpin for Logical<Logical, Physical>
where Logical: Unpin,

§

impl<Logical, Physical> !UnwindSafe for Logical<Logical, Physical>

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

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

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
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> IntoColumn for T
where T: IntoSeries,

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
§

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
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 = Infallible

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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T