pub enum ScalarValue {
Bool(bool),
Primitive(PValue),
Decimal(DecimalValue),
Utf8(BufferString),
Binary(ByteBuffer),
List(Vec<Option<ScalarValue>>),
}Expand description
The value stored in a Scalar.
This enum represents the possible non-null values that can be stored in a scalar. When the
scalar is null, the value is represented as None in the Option<ScalarValue> field.
Variants§
Bool(bool)
A boolean value.
Primitive(PValue)
A primitive numeric value.
Decimal(DecimalValue)
A decimal value.
Utf8(BufferString)
A UTF-8 encoded string value.
Binary(ByteBuffer)
A binary (byte array) value.
List(Vec<Option<ScalarValue>>)
A list of potentially null scalar values.
Implementations§
Source§impl ScalarValue
impl ScalarValue
Sourcepub fn as_primitive(&self) -> &PValue
pub fn as_primitive(&self) -> &PValue
Returns the primitive value, panicking if the value is not a
Primitive.
Sourcepub fn as_decimal(&self) -> &DecimalValue
pub fn as_decimal(&self) -> &DecimalValue
Returns the decimal value, panicking if the value is not a
Decimal.
Sourcepub fn as_utf8(&self) -> &BufferString
pub fn as_utf8(&self) -> &BufferString
Returns the UTF-8 string value, panicking if the value is not a Utf8.
Sourcepub fn as_binary(&self) -> &ByteBuffer
pub fn as_binary(&self) -> &ByteBuffer
Returns the binary value, panicking if the value is not a Binary.
Sourcepub fn as_list(&self) -> &[Option<ScalarValue>]
pub fn as_list(&self) -> &[Option<ScalarValue>]
Returns the list elements, panicking if the value is not a List.
Sourcepub fn into_bool(self) -> bool
pub fn into_bool(self) -> bool
Returns the boolean value, panicking if the value is not a Bool.
Sourcepub fn into_primitive(self) -> PValue
pub fn into_primitive(self) -> PValue
Returns the primitive value, panicking if the value is not a
Primitive.
Sourcepub fn into_decimal(self) -> DecimalValue
pub fn into_decimal(self) -> DecimalValue
Returns the decimal value, panicking if the value is not a
Decimal.
Sourcepub fn into_utf8(self) -> BufferString
pub fn into_utf8(self) -> BufferString
Returns the UTF-8 string value, panicking if the value is not a Utf8.
Sourcepub fn into_binary(self) -> ByteBuffer
pub fn into_binary(self) -> ByteBuffer
Returns the binary value, panicking if the value is not a Binary.
Source§impl ScalarValue
impl ScalarValue
Sourcepub fn to_proto(this: Option<&Self>) -> ScalarValue
pub fn to_proto(this: Option<&Self>) -> ScalarValue
Ideally, we would not have this function and instead implement this From implementation:
impl From<Option<&ScalarValue>> for pb::ScalarValue { ... }However, we are not allowed to do this because of the Orphan rule (Option and
pb::ScalarValue are not types defined in this crate). So we must make this a method on
vortex_array::scalar::ScalarValue directly.
Sourcepub fn to_proto_bytes<B: Default + BufMut>(value: Option<&ScalarValue>) -> B
pub fn to_proto_bytes<B: Default + BufMut>(value: Option<&ScalarValue>) -> B
Serialize an optional ScalarValue to protobuf bytes (handles null values).
Source§impl ScalarValue
impl ScalarValue
Sourcepub fn from_proto_bytes(
bytes: &[u8],
dtype: &DType,
) -> VortexResult<Option<Self>>
pub fn from_proto_bytes( bytes: &[u8], dtype: &DType, ) -> VortexResult<Option<Self>>
Deserialize a ScalarValue from protobuf bytes.
Note that we need to provide a DType since protobuf serialization only supports 64-bit
integers, and serializing into protobuf loses that type information.
§Errors
Returns an error if decoding or type validation fails.
Sourcepub fn from_proto(
value: &ScalarValue,
dtype: &DType,
) -> VortexResult<Option<Self>>
pub fn from_proto( value: &ScalarValue, dtype: &DType, ) -> VortexResult<Option<Self>>
Creates a ScalarValue from its protobuf representation.
Note that we need to provide a DType since protobuf serialization only supports 64-bit
integers, and serializing into protobuf loses that type information.
§Errors
Returns an error if the protobuf value cannot be converted to the given DType.
Source§impl ScalarValue
impl ScalarValue
Sourcepub fn zero_value(dtype: &DType) -> Self
pub fn zero_value(dtype: &DType) -> Self
Returns the zero / identity value for the given DType.
§Zero Values
Here is the list of zero values for each DType (when the DType is non-nullable):
-
Null: Does not have a “zero” value -
Bool:false -
Primitive:0 -
Decimal:0 -
Utf8:"" -
Binary: An empty buffer -
List: An empty list -
FixedSizeList: A list (with correct size) of zero values, which is determined by the elementDType -
Struct: A struct where each field has a zero value, which is determined by the fieldDType -
Extension: TODO(connor): Is this right? The zero value of the storageDType
Sourcepub fn default_value(dtype: &DType) -> Option<Self>
pub fn default_value(dtype: &DType) -> Option<Self>
A similar function to ScalarValue::zero_value, but for nullable DTypes, this returns
None instead.
For non-nullable and nested types that may need null values in their children (as of right
now, that is only FixedSizeList and Struct), this function will provide None as the
default child values (whereas ScalarValue::zero_value would provide Some(_)).
Trait Implementations§
Source§impl Clone for ScalarValue
impl Clone for ScalarValue
Source§fn clone(&self) -> ScalarValue
fn clone(&self) -> ScalarValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScalarValue
impl Debug for ScalarValue
Source§impl Display for ScalarValue
impl Display for ScalarValue
Source§impl From<&[u8]> for ScalarValue
impl From<&[u8]> for ScalarValue
Source§impl From<&ScalarValue> for ScalarValue
impl From<&ScalarValue> for ScalarValue
Source§fn from(value: &ScalarValue) -> Self
fn from(value: &ScalarValue) -> Self
Source§impl From<&str> for ScalarValue
impl From<&str> for ScalarValue
Source§impl From<Buffer<u8>> for ScalarValue
impl From<Buffer<u8>> for ScalarValue
Source§fn from(value: ByteBuffer) -> Self
fn from(value: ByteBuffer) -> Self
Source§impl From<BufferString> for ScalarValue
impl From<BufferString> for ScalarValue
Source§fn from(value: BufferString) -> Self
fn from(value: BufferString) -> Self
Source§impl From<DecimalValue> for ScalarValue
impl From<DecimalValue> for ScalarValue
Source§fn from(value: DecimalValue) -> Self
fn from(value: DecimalValue) -> Self
Source§impl From<PValue> for ScalarValue
impl From<PValue> for ScalarValue
Source§impl From<String> for ScalarValue
impl From<String> for ScalarValue
Source§impl<T> From<Vec<T>> for ScalarValue
impl<T> From<Vec<T>> for ScalarValue
Source§impl From<bool> for ScalarValue
impl From<bool> for ScalarValue
Source§impl From<f16> for ScalarValue
Into<ScalarValue> for T.
impl From<f16> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<f32> for ScalarValue
Into<ScalarValue> for T.
impl From<f32> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<f64> for ScalarValue
Into<ScalarValue> for T.
impl From<f64> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<i16> for ScalarValue
Into<ScalarValue> for T.
impl From<i16> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<i32> for ScalarValue
Into<ScalarValue> for T.
impl From<i32> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<i64> for ScalarValue
Into<ScalarValue> for T.
impl From<i64> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<i8> for ScalarValue
Into<ScalarValue> for T.
impl From<i8> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<u16> for ScalarValue
Into<ScalarValue> for T.
impl From<u16> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<u32> for ScalarValue
Into<ScalarValue> for T.
impl From<u32> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<u64> for ScalarValue
Into<ScalarValue> for T.
impl From<u64> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<u8> for ScalarValue
Into<ScalarValue> for T.
impl From<u8> for ScalarValue
Into<ScalarValue> for T.
Source§impl From<usize> for ScalarValue
impl From<usize> for ScalarValue
Source§impl Hash for ScalarValue
impl Hash for ScalarValue
Source§impl PartialEq for ScalarValue
impl PartialEq for ScalarValue
Source§impl PartialOrd for ScalarValue
impl PartialOrd for ScalarValue
Source§impl TryFrom<&ScalarValue> for f16
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for f16
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for f32
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for f32
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for f64
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for f64
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for i16
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for i16
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for i32
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for i32
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for i64
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for i64
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for i8
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for i8
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for u16
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for u16
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for u32
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for u32
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for u64
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for u64
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for u8
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for u8
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
Source§impl TryFrom<&ScalarValue> for usize
Fallible conversion from a ScalarValue into an T.
impl TryFrom<&ScalarValue> for usize
Fallible conversion from a ScalarValue into an T.
§Errors
Returns an error if unable to convert the scalar value into the target type,
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(value: &ScalarValue) -> VortexResult<Self>
fn try_from(value: &ScalarValue) -> VortexResult<Self>
impl Eq for ScalarValue
impl StructuralPartialEq for ScalarValue
Auto Trait Implementations§
impl !Freeze for ScalarValue
impl RefUnwindSafe for ScalarValue
impl Send for ScalarValue
impl Sync for ScalarValue
impl Unpin for ScalarValue
impl UnsafeUnpin for ScalarValue
impl UnwindSafe for ScalarValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);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> SessionVar for T
impl<T> SessionVar for T
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.