pub struct Layout<V: VTable> { /* private fields */ }Expand description
A typed layout node.
Implementations§
Source§impl Layout<Chunked>
impl Layout<Chunked>
Sourcepub fn new(
row_count: u64,
dtype: DType,
children: Arc<dyn LayoutChildren>,
) -> Self
pub fn new( row_count: u64, dtype: DType, children: Arc<dyn LayoutChildren>, ) -> Self
Construct a chunked layout.
Sourcepub fn with_children(&self, children: Vec<LayoutRef>) -> Self
pub fn with_children(&self, children: Vec<LayoutRef>) -> Self
Rebuild this layout with owned children.
Source§impl Layout<Dict>
impl Layout<Dict>
Sourcepub fn has_all_values_referenced(&self) -> bool
pub fn has_all_values_referenced(&self) -> bool
Returns whether every dictionary value is known to be referenced.
Source§impl Layout<Flat>
impl Layout<Flat>
Sourcepub fn new(
row_count: u64,
dtype: DType,
segment_id: SegmentId,
ctx: ReadContext,
) -> Self
pub fn new( row_count: u64, dtype: DType, segment_id: SegmentId, ctx: ReadContext, ) -> Self
Construct a flat layout without an inline array encoding tree.
Sourcepub fn new_with_metadata(
row_count: u64,
dtype: DType,
segment_id: SegmentId,
ctx: ReadContext,
array_tree: Option<ByteBuffer>,
) -> Self
pub fn new_with_metadata( row_count: u64, dtype: DType, segment_id: SegmentId, ctx: ReadContext, array_tree: Option<ByteBuffer>, ) -> Self
Construct a flat layout with optional inline array metadata.
Sourcepub fn segment_id(&self) -> SegmentId
pub fn segment_id(&self) -> SegmentId
Returns the serialized array segment ID.
Sourcepub fn array_ctx(&self) -> &ReadContext
pub fn array_ctx(&self) -> &ReadContext
Returns the array read context.
Sourcepub fn array_tree(&self) -> Option<&ByteBuffer>
pub fn array_tree(&self) -> Option<&ByteBuffer>
Returns the optional inline array encoding tree.
Source§impl Layout<List>
impl Layout<List>
Sourcepub fn new(
dtype: DType,
elements: LayoutRef,
offsets: LayoutRef,
validity: Option<LayoutRef>,
) -> Self
pub fn new( dtype: DType, elements: LayoutRef, offsets: LayoutRef, validity: Option<LayoutRef>, ) -> Self
Construct a list layout from its children.
Sourcepub fn elements(&self) -> VortexResult<LayoutRef>
pub fn elements(&self) -> VortexResult<LayoutRef>
Returns the elements child.
Sourcepub fn offsets(&self) -> VortexResult<LayoutRef>
pub fn offsets(&self) -> VortexResult<LayoutRef>
Returns the offsets child.
Sourcepub fn validity(&self) -> VortexResult<Option<LayoutRef>>
pub fn validity(&self) -> VortexResult<Option<LayoutRef>>
Returns the optional validity child.
Sourcepub fn offsets_ptype(&self) -> PType
pub fn offsets_ptype(&self) -> PType
Returns the integer ptype used by offsets.
Sourcepub fn elements_dtype(&self) -> &DType
pub fn elements_dtype(&self) -> &DType
Returns the list element dtype.
Source§impl Layout<Struct>
impl Layout<Struct>
Sourcepub fn new(row_count: u64, dtype: DType, children: Vec<LayoutRef>) -> Self
pub fn new(row_count: u64, dtype: DType, children: Vec<LayoutRef>) -> Self
Construct a struct layout from owned children.
Sourcepub fn struct_fields(&self) -> &StructFields
pub fn struct_fields(&self) -> &StructFields
Returns the struct fields.
Sourcepub fn matching_fields<F>(
&self,
field_mask: &[FieldMask],
per_child: F,
) -> VortexResult<()>
pub fn matching_fields<F>( &self, field_mask: &[FieldMask], per_child: F, ) -> VortexResult<()>
Invokes per_child for fields selected by field_mask.
Source§impl Layout<LegacyStats>
impl Layout<LegacyStats>
Source§impl Layout<Zoned>
impl Layout<Zoned>
Sourcepub fn try_new(
data: LayoutRef,
zones: LayoutRef,
zone_len: NonZeroUsize,
aggregate_fns: Arc<[AggregateFnRef]>,
) -> VortexResult<Self>
pub fn try_new( data: LayoutRef, zones: LayoutRef, zone_len: NonZeroUsize, aggregate_fns: Arc<[AggregateFnRef]>, ) -> VortexResult<Self>
Create a zoned layout from a data child, a zone-map child, a zone length, and the aggregate functions stored in the zone map.
pub fn zone_len(&self) -> usize
Sourcepub fn present_aggregates(&self) -> Arc<[String]> ⓘ
pub fn present_aggregates(&self) -> Arc<[String]> ⓘ
Returns display names for the zone-map aggregates stored by this layout.
pub fn nzones(&self) -> usize
Source§impl<V: VTable> Layout<V>
impl<V: VTable> Layout<V>
Sourcepub fn from_parts(parts: LayoutParts<V>) -> Self
pub fn from_parts(parts: LayoutParts<V>) -> Self
Construct a layout from explicit parts.
Sourcepub fn data(&self) -> &V::LayoutData
pub fn data(&self) -> &V::LayoutData
Returns layout-specific data.
Sourcepub fn segment_ids(&self) -> &[SegmentId]
pub fn segment_ids(&self) -> &[SegmentId]
Returns directly referenced segment IDs.
Sourcepub fn children(&self) -> &Arc<dyn LayoutChildren> ⓘ
pub fn children(&self) -> &Arc<dyn LayoutChildren> ⓘ
Returns the child adapter.
Sourcepub fn nslots(&self) -> usize
pub fn nslots(&self) -> usize
Returns the number of logical child slots, including any that are absent.
Sourcepub fn slot_to_child(&self, slot: usize) -> Option<usize>
pub fn slot_to_child(&self, slot: usize) -> Option<usize>
Maps a logical slot to the index of its serialized child, or None if absent.
Sourcepub fn slot(&self, slot: usize) -> VortexResult<Option<LayoutRef>>
pub fn slot(&self, slot: usize) -> VortexResult<Option<LayoutRef>>
Materialize the child in logical slot, or None if the slot is absent.
Sourcepub fn slot_type(&self, slot: usize) -> Option<LayoutChildType>
pub fn slot_type(&self, slot: usize) -> Option<LayoutChildType>
Returns the relationship of the child in logical slot to this layout, or None if the
slot is absent.
Sourcepub fn child_row_count(&self, idx: usize) -> u64
pub fn child_row_count(&self, idx: usize) -> u64
Returns a child’s serialized row count without materializing it.
Sourcepub fn into_layout(self) -> LayoutRef
pub fn into_layout(self) -> LayoutRef
Erase this typed layout into a shared layout reference.
Sourcepub fn new_reader(
&self,
name: Arc<str>,
segment_source: Arc<dyn SegmentSource>,
session: &VortexSession,
ctx: &LayoutReaderContext,
) -> VortexResult<LayoutReaderRef>
pub fn new_reader( &self, name: Arc<str>, segment_source: Arc<dyn SegmentSource>, session: &VortexSession, ctx: &LayoutReaderContext, ) -> VortexResult<LayoutReaderRef>
Construct a reader for this layout.
Trait Implementations§
Source§impl<V: VTable> DynLayout for Layout<V>
impl<V: VTable> DynLayout for Layout<V>
Source§fn dyn_to_layout(&self) -> LayoutRef
fn dyn_to_layout(&self) -> LayoutRef
Source§fn dyn_encoding_id(&self) -> LayoutId
fn dyn_encoding_id(&self) -> LayoutId
Source§fn dyn_row_count(&self) -> u64
fn dyn_row_count(&self) -> u64
Source§fn dyn_nchildren(&self) -> usize
fn dyn_nchildren(&self) -> usize
Source§fn dyn_nslots(&self) -> usize
fn dyn_nslots(&self) -> usize
Source§fn dyn_slot(&self, slot: usize) -> VortexResult<Option<LayoutRef>>
fn dyn_slot(&self, slot: usize) -> VortexResult<Option<LayoutRef>>
slot, or None if the slot is absent.Source§fn dyn_slot_type(&self, slot: usize) -> Option<LayoutChildType>
fn dyn_slot_type(&self, slot: usize) -> Option<LayoutChildType>
slot, or None if the slot is absent.Source§fn dyn_segment_ids(&self) -> Vec<SegmentId>
fn dyn_segment_ids(&self) -> Vec<SegmentId>
Source§fn dyn_new_reader(
&self,
name: Arc<str>,
segment_source: Arc<dyn SegmentSource>,
session: &VortexSession,
ctx: &LayoutReaderContext,
) -> VortexResult<LayoutReaderRef>
fn dyn_new_reader( &self, name: Arc<str>, segment_source: Arc<dyn SegmentSource>, session: &VortexSession, ctx: &LayoutReaderContext, ) -> VortexResult<LayoutReaderRef>
Source§fn dyn_is_indivisible(&self) -> bool
fn dyn_is_indivisible(&self) -> bool
true if this layout is indivisible: its readers never register natural split
boundaries strictly inside their row range (see crate::VTable::is_indivisible).Auto Trait Implementations§
impl<V> !RefUnwindSafe for Layout<V>
impl<V> !UnwindSafe for Layout<V>
impl<V> Freeze for Layout<V>
impl<V> Send for Layout<V>
impl<V> Sync for Layout<V>
impl<V> Unpin for Layout<V>
impl<V> UnsafeUnpin for Layout<V>where
Arc<LayoutInner<V>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, A> DynAccess<T> for A
impl<T, A> DynAccess<T> for A
Source§fn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
Access::load.Source§impl<K, V, T> Expiry<K, V> for T
impl<K, V, T> Expiry<K, V> for T
Source§fn expire_after_create(
&self,
key: &K,
value: &V,
created_at: Instant,
) -> Option<Duration>
fn expire_after_create( &self, key: &K, value: &V, created_at: Instant, ) -> Option<Duration>
insert and get_with but only when the key
was not present in the cache. Read moreSource§fn expire_after_read(
&self,
key: &K,
value: &V,
read_at: Instant,
duration_until_expiry: Option<Duration>,
last_modified_at: Instant,
) -> Option<Duration>
fn expire_after_read( &self, key: &K, value: &V, read_at: Instant, duration_until_expiry: Option<Duration>, last_modified_at: Instant, ) -> Option<Duration>
get and get_with but only when the key is present in
the cache. Read moreSource§fn expire_after_update(
&self,
key: &K,
value: &V,
updated_at: Instant,
duration_until_expiry: Option<Duration>,
) -> Option<Duration>
fn expire_after_update( &self, key: &K, value: &V, updated_at: Instant, duration_until_expiry: Option<Duration>, ) -> Option<Duration>
insert but only when the key is
already present in the cache. Read moreSource§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>
renamed to 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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.