pub struct Field { /* private fields */ }Expand description
Describes a single column in a Schema.
A Schema is an ordered collection of
Field objects. Fields contain:
name: the name of the fielddata_type: the type of the fieldnullable: if the field is nullablemetadata: a map of key-value pairs containing additional custom metadata
Arrow Extension types, are encoded in Fields metadata. See
Self::try_extension_type to retrieve the ExtensionType, if any.
Implementations§
Source§impl Field
impl Field
Sourcepub const LIST_FIELD_DEFAULT_NAME: &'static str = "item"
pub const LIST_FIELD_DEFAULT_NAME: &'static str = "item"
Default list member field name
Sourcepub fn new(
name: impl Into<String>,
data_type: DataType,
nullable: bool,
) -> Field
pub fn new( name: impl Into<String>, data_type: DataType, nullable: bool, ) -> Field
Creates a new field with the given name, data type, and nullability
§Example
Field::new("field_name", DataType::Int32, true);Sourcepub fn new_list_field(data_type: DataType, nullable: bool) -> Field
pub fn new_list_field(data_type: DataType, nullable: bool) -> Field
Creates a new Field suitable for DataType::List and
DataType::LargeList
While not required, this method follows the convention of naming the
Field "item".
§Example
assert_eq!(
Field::new("item", DataType::Int32, true),
Field::new_list_field(DataType::Int32, true)
);Sourcepub fn new_dict(
name: impl Into<String>,
data_type: DataType,
nullable: bool,
dict_id: i64,
dict_is_ordered: bool,
) -> Field
👎Deprecated since 54.0.0: The ability to preserve dictionary IDs will be removed. With the dict_id field disappearing this function signature will change by removing the dict_id parameter.
pub fn new_dict( name: impl Into<String>, data_type: DataType, nullable: bool, dict_id: i64, dict_is_ordered: bool, ) -> Field
Creates a new field that has additional dictionary information
Sourcepub fn new_dictionary(
name: impl Into<String>,
key: DataType,
value: DataType,
nullable: bool,
) -> Field
pub fn new_dictionary( name: impl Into<String>, key: DataType, value: DataType, nullable: bool, ) -> Field
Create a new Field with DataType::Dictionary
Use Self::new_dict for more advanced dictionary options
§Panics
Panics if !key.is_dictionary_key_type
Sourcepub fn new_struct(
name: impl Into<String>,
fields: impl Into<Fields>,
nullable: bool,
) -> Field
pub fn new_struct( name: impl Into<String>, fields: impl Into<Fields>, nullable: bool, ) -> Field
Create a new Field with DataType::Struct
name: the name of theDataType::Structfieldfields: the description of each struct elementnullable: if theDataType::Structarray is nullable
Sourcepub fn new_list(
name: impl Into<String>,
value: impl Into<Arc<Field>>,
nullable: bool,
) -> Field
pub fn new_list( name: impl Into<String>, value: impl Into<Arc<Field>>, nullable: bool, ) -> Field
Create a new Field with DataType::List
name: the name of theDataType::Listfieldvalue: the description of each list elementnullable: if theDataType::Listarray is nullable
Sourcepub fn new_large_list(
name: impl Into<String>,
value: impl Into<Arc<Field>>,
nullable: bool,
) -> Field
pub fn new_large_list( name: impl Into<String>, value: impl Into<Arc<Field>>, nullable: bool, ) -> Field
Create a new Field with DataType::LargeList
name: the name of theDataType::LargeListfieldvalue: the description of each list elementnullable: if theDataType::LargeListarray is nullable
Sourcepub fn new_fixed_size_list(
name: impl Into<String>,
value: impl Into<Arc<Field>>,
size: i32,
nullable: bool,
) -> Field
pub fn new_fixed_size_list( name: impl Into<String>, value: impl Into<Arc<Field>>, size: i32, nullable: bool, ) -> Field
Create a new Field with DataType::FixedSizeList
name: the name of theDataType::FixedSizeListfieldvalue: the description of each list elementsize: the size of the fixed size listnullable: if theDataType::FixedSizeListarray is nullable
Sourcepub fn new_map(
name: impl Into<String>,
entries: impl Into<String>,
keys: impl Into<Arc<Field>>,
values: impl Into<Arc<Field>>,
sorted: bool,
nullable: bool,
) -> Field
pub fn new_map( name: impl Into<String>, entries: impl Into<String>, keys: impl Into<Arc<Field>>, values: impl Into<Arc<Field>>, sorted: bool, nullable: bool, ) -> Field
Create a new Field with DataType::Map
name: the name of theDataType::Mapfieldentries: the name of the innerDataType::Structfieldkeys: the map keysvalues: the map valuessorted: if theDataType::Maparray is sortednullable: if theDataType::Maparray is nullable
Sourcepub fn new_union<S, F, T>(
name: S,
type_ids: T,
fields: F,
mode: UnionMode,
) -> Fieldwhere
S: Into<String>,
F: IntoIterator,
<F as IntoIterator>::Item: Into<Arc<Field>>,
T: IntoIterator<Item = i8>,
pub fn new_union<S, F, T>(
name: S,
type_ids: T,
fields: F,
mode: UnionMode,
) -> Fieldwhere
S: Into<String>,
F: IntoIterator,
<F as IntoIterator>::Item: Into<Arc<Field>>,
T: IntoIterator<Item = i8>,
Create a new Field with DataType::Union
name: the name of theDataType::Unionfieldtype_ids: the union type idsfields: the union fieldsmode: the union mode
Sourcepub fn set_metadata(&mut self, metadata: HashMap<String, String>)
pub fn set_metadata(&mut self, metadata: HashMap<String, String>)
Sets the Field’s optional custom metadata.
Sourcepub fn with_metadata(self, metadata: HashMap<String, String>) -> Field
pub fn with_metadata(self, metadata: HashMap<String, String>) -> Field
Sets the metadata of this Field to be metadata and returns self
Sourcepub const fn metadata(&self) -> &HashMap<String, String>
pub const fn metadata(&self) -> &HashMap<String, String>
Returns the immutable reference to the Field’s optional custom metadata.
Sourcepub fn metadata_mut(&mut self) -> &mut HashMap<String, String>
pub fn metadata_mut(&mut self) -> &mut HashMap<String, String>
Returns a mutable reference to the Field’s optional custom metadata.
Sourcepub fn with_name(self, name: impl Into<String>) -> Field
pub fn with_name(self, name: impl Into<String>) -> Field
Set the name of the Field and returns self.
let field = Field::new("c1", DataType::Int64, false)
.with_name("c2");
assert_eq!(field.name(), "c2");Sourcepub fn set_data_type(&mut self, data_type: DataType)
pub fn set_data_type(&mut self, data_type: DataType)
Sourcepub fn with_data_type(self, data_type: DataType) -> Field
pub fn with_data_type(self, data_type: DataType) -> Field
Sourcepub fn extension_type_name(&self) -> Option<&str>
pub fn extension_type_name(&self) -> Option<&str>
Returns the extension type name of this Field, if set.
This returns the value of EXTENSION_TYPE_NAME_KEY, if set in
Field::metadata. If the key is missing, there is no extension type
name and this returns None.
§Example
let field = Field::new("", DataType::Null, false);
assert_eq!(field.extension_type_name(), None);
let field = Field::new("", DataType::Null, false).with_metadata(
[(EXTENSION_TYPE_NAME_KEY.to_owned(), "example".to_owned())]
.into_iter()
.collect(),
);
assert_eq!(field.extension_type_name(), Some("example"));Sourcepub fn extension_type_metadata(&self) -> Option<&str>
pub fn extension_type_metadata(&self) -> Option<&str>
Returns the extension type metadata of this Field, if set.
This returns the value of EXTENSION_TYPE_METADATA_KEY, if set in
Field::metadata. If the key is missing, there is no extension type
metadata and this returns None.
§Example
let field = Field::new("", DataType::Null, false);
assert_eq!(field.extension_type_metadata(), None);
let field = Field::new("", DataType::Null, false).with_metadata(
[(EXTENSION_TYPE_METADATA_KEY.to_owned(), "example".to_owned())]
.into_iter()
.collect(),
);
assert_eq!(field.extension_type_metadata(), Some("example"));Sourcepub fn try_extension_type<E>(&self) -> Result<E, ArrowError>where
E: ExtensionType,
pub fn try_extension_type<E>(&self) -> Result<E, ArrowError>where
E: ExtensionType,
Returns an instance of the given ExtensionType of this Field,
if set in the Field::metadata.
§Error
Returns an error if
- this field does not have the name of this extension type
(
ExtensionType::NAME) in theField::metadata(mismatch or missing) - the deserialization of the metadata
(
ExtensionType::deserialize_metadata) fails - the construction of the extension type (
ExtensionType::try_new) fail (for example when theField::data_typeis not supported by the extension type (ExtensionType::supports_data_type))
Sourcepub fn extension_type<E>(&self) -> Ewhere
E: ExtensionType,
pub fn extension_type<E>(&self) -> Ewhere
E: ExtensionType,
Returns an instance of the given ExtensionType of this Field,
panics if this Field does not have this extension type.
§Panic
This calls Field::try_extension_type and panics when it returns an
error.
Sourcepub fn try_with_extension_type<E>(
&mut self,
extension_type: E,
) -> Result<(), ArrowError>where
E: ExtensionType,
pub fn try_with_extension_type<E>(
&mut self,
extension_type: E,
) -> Result<(), ArrowError>where
E: ExtensionType,
Updates the metadata of this Field with the ExtensionType::NAME
and ExtensionType::metadata of the given ExtensionType, if the
given extension type supports the Field::data_type of this field
(ExtensionType::supports_data_type).
If the given extension type defines no metadata, a previously set
value of EXTENSION_TYPE_METADATA_KEY is cleared.
§Error
This functions returns an error if the data type of this field does not match any of the supported storage types of the given extension type.
Sourcepub fn with_extension_type<E>(self, extension_type: E) -> Fieldwhere
E: ExtensionType,
pub fn with_extension_type<E>(self, extension_type: E) -> Fieldwhere
E: ExtensionType,
Updates the metadata of this Field with the ExtensionType::NAME
and ExtensionType::metadata of the given ExtensionType.
§Panics
This calls Field::try_with_extension_type and panics when it
returns an error.
Sourcepub fn try_canonical_extension_type(
&self,
) -> Result<CanonicalExtensionType, ArrowError>
pub fn try_canonical_extension_type( &self, ) -> Result<CanonicalExtensionType, ArrowError>
Returns the CanonicalExtensionType of this Field, if set.
§Error
Returns an error if
- this field does not have a canonical extension type (mismatch or missing)
- the canonical extension is not supported
- the construction of the extension type fails
Sourcepub const fn is_nullable(&self) -> bool
pub const fn is_nullable(&self) -> bool
Indicates whether this Field supports null values.
If true, the field may contain null values.
Sourcepub fn set_nullable(&mut self, nullable: bool)
pub fn set_nullable(&mut self, nullable: bool)
Set the nullable of this Field.
let mut field = Field::new("c1", DataType::Int64, false);
field.set_nullable(true);
assert_eq!(field.is_nullable(), true);Sourcepub fn with_nullable(self, nullable: bool) -> Field
pub fn with_nullable(self, nullable: bool) -> Field
Set nullable of the Field and returns self.
let field = Field::new("c1", DataType::Int64, false)
.with_nullable(true);
assert_eq!(field.is_nullable(), true);Sourcepub const fn dict_id(&self) -> Option<i64>
👎Deprecated since 54.0.0: The ability to preserve dictionary IDs will be removed. With it, all fields related to it.
pub const fn dict_id(&self) -> Option<i64>
Returns the dictionary ID, if this is a dictionary type.
Sourcepub const fn dict_is_ordered(&self) -> Option<bool>
pub const fn dict_is_ordered(&self) -> Option<bool>
Returns whether this Field’s dictionary is ordered, if this is a dictionary type.
§Example
// non dictionaries do not have a dict is ordered flat
let field = Field::new("c1", DataType::Int64, false);
assert_eq!(field.dict_is_ordered(), None);
// by default dictionary is not ordered
let field = Field::new("c1", DataType::Dictionary(Box::new(DataType::Int64), Box::new(DataType::Utf8)), false);
assert_eq!(field.dict_is_ordered(), Some(false));
let field = field.with_dict_is_ordered(true);
assert_eq!(field.dict_is_ordered(), Some(true));Sourcepub fn with_dict_is_ordered(self, dict_is_ordered: bool) -> Field
pub fn with_dict_is_ordered(self, dict_is_ordered: bool) -> Field
Set the is ordered field for this Field, if it is a dictionary.
Does nothing if this is not a dictionary type.
See Field::dict_is_ordered for more information.
Sourcepub fn try_merge(&mut self, from: &Field) -> Result<(), ArrowError>
pub fn try_merge(&mut self, from: &Field) -> Result<(), ArrowError>
Merge this field into self if it is compatible.
Struct fields are merged recursively.
NOTE: self may be updated to a partial / unexpected state in case of merge failure.
Example:
let mut field = Field::new("c1", DataType::Int64, false);
assert!(field.try_merge(&Field::new("c1", DataType::Int64, true)).is_ok());
assert!(field.is_nullable());Trait Implementations§
Source§impl Extend<Field> for SchemaBuilder
impl Extend<Field> for SchemaBuilder
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Field>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Field>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl From<&Field> for FieldMetadata
impl From<&Field> for FieldMetadata
Source§fn from(field: &Field) -> FieldMetadata
fn from(field: &Field) -> FieldMetadata
Source§impl From<&Field> for LogicalField
impl From<&Field> for LogicalField
Source§fn from(value: &Field) -> LogicalField
fn from(value: &Field) -> LogicalField
Source§impl From<&SerializedComponentBatch> for Field
impl From<&SerializedComponentBatch> for Field
Source§fn from(batch: &SerializedComponentBatch) -> Field
fn from(batch: &SerializedComponentBatch) -> Field
Source§impl From<Field> for ComponentDescriptor
impl From<Field> for ComponentDescriptor
Source§fn from(field: Field) -> ComponentDescriptor
fn from(field: Field) -> ComponentDescriptor
Source§impl FromIterator<Field> for Fields
impl FromIterator<Field> for Fields
Source§impl MetadataExt for Field
impl MetadataExt for Field
Source§impl Ord for Field
impl Ord for Field
Source§impl PartialOrd for Field
impl PartialOrd for Field
Source§impl SizeBytes for Field
impl SizeBytes for Field
Source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self uses on the heap. Read moreSource§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self in bytes, accounting for both stack and heap space.Source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self on the stack, in bytes. Read moreSource§impl TryFrom<&FFI_ArrowSchema> for Field
impl TryFrom<&FFI_ArrowSchema> for Field
Source§type Error = ArrowError
type Error = ArrowError
Source§fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Field, ArrowError>
fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Field, ArrowError>
Source§impl TryFrom<&Field> for CanonicalExtensionType
impl TryFrom<&Field> for CanonicalExtensionType
Source§type Error = ArrowError
type Error = ArrowError
Source§fn try_from(
value: &Field,
) -> Result<CanonicalExtensionType, <CanonicalExtensionType as TryFrom<&Field>>::Error>
fn try_from( value: &Field, ) -> Result<CanonicalExtensionType, <CanonicalExtensionType as TryFrom<&Field>>::Error>
Source§impl TryFrom<&Field> for ColumnKind
impl TryFrom<&Field> for ColumnKind
Source§type Error = UnknownColumnKind
type Error = UnknownColumnKind
Source§fn try_from(
field: &Field,
) -> Result<ColumnKind, <ColumnKind as TryFrom<&Field>>::Error>
fn try_from( field: &Field, ) -> Result<ColumnKind, <ColumnKind as TryFrom<&Field>>::Error>
Source§impl TryFrom<&Field> for FFI_ArrowSchema
impl TryFrom<&Field> for FFI_ArrowSchema
Source§type Error = ArrowError
type Error = ArrowError
Source§fn try_from(field: &Field) -> Result<FFI_ArrowSchema, ArrowError>
fn try_from(field: &Field) -> Result<FFI_ArrowSchema, ArrowError>
Source§impl TryFrom<&Field> for IndexColumnDescriptor
impl TryFrom<&Field> for IndexColumnDescriptor
Source§type Error = UnsupportedTimeType
type Error = UnsupportedTimeType
Source§fn try_from(
field: &Field,
) -> Result<IndexColumnDescriptor, <IndexColumnDescriptor as TryFrom<&Field>>::Error>
fn try_from( field: &Field, ) -> Result<IndexColumnDescriptor, <IndexColumnDescriptor as TryFrom<&Field>>::Error>
Source§impl TryFrom<&Field> for RowIdColumnDescriptor
impl TryFrom<&Field> for RowIdColumnDescriptor
Source§type Error = WrongDatatypeError
type Error = WrongDatatypeError
Source§fn try_from(
field: &Field,
) -> Result<RowIdColumnDescriptor, <RowIdColumnDescriptor as TryFrom<&Field>>::Error>
fn try_from( field: &Field, ) -> Result<RowIdColumnDescriptor, <RowIdColumnDescriptor as TryFrom<&Field>>::Error>
Source§impl TryFrom<Field> for FFI_ArrowSchema
impl TryFrom<Field> for FFI_ArrowSchema
Source§type Error = ArrowError
type Error = ArrowError
Source§fn try_from(field: Field) -> Result<FFI_ArrowSchema, ArrowError>
fn try_from(field: Field) -> Result<FFI_ArrowSchema, ArrowError>
impl Eq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DragDropItem for Twhere
T: Hash,
impl<T> DragDropItem for Twhere
T: Hash,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.