Struct sql_schema_describer::walkers::Walker
source · pub struct Walker<'a, Id> {
pub id: Id,
pub schema: &'a SqlSchema,
}
Expand description
A generic reference to a schema item. It holds a reference to the schema so it can offer a convenient API based on the Id type.
Fields§
§id: Id
The identifier.
schema: &'a SqlSchema
The schema for which the identifier is valid.
Implementations§
source§impl<'a> Walker<'a, IndexColumnId>
impl<'a> Walker<'a, IndexColumnId>
sourcepub fn get(self) -> &'a IndexColumn
pub fn get(self) -> &'a IndexColumn
Get the index column data.
sourcepub fn length(self) -> Option<u32>
pub fn length(self) -> Option<u32>
The length limit of the (text) column. Matters on MySQL only.
sourcepub fn sort_order(self) -> Option<SQLSortOrder>
pub fn sort_order(self) -> Option<SQLSortOrder>
The BTree ordering.
sourcepub fn table(self) -> TableWalker<'a>
pub fn table(self) -> TableWalker<'a>
The table where the column is located.
sourcepub fn index(self) -> IndexWalker<'a>
pub fn index(self) -> IndexWalker<'a>
The index of the column.
sourcepub fn as_column(self) -> TableColumnWalker<'a>
pub fn as_column(self) -> TableColumnWalker<'a>
Convert to a normal column walker, losing the possible index arguments.
source§impl<'a> Walker<'a, TableColumnId>
impl<'a> Walker<'a, TableColumnId>
sourcepub fn coarsen(self) -> ColumnWalker<'a>
pub fn coarsen(self) -> ColumnWalker<'a>
Coarsen the walker into a generic column version.
sourcepub fn arity(self) -> ColumnArity
pub fn arity(self) -> ColumnArity
The nullability and arity of the column.
sourcepub fn column_has_enum_default_value(self, enum_name: &str, value: &str) -> bool
pub fn column_has_enum_default_value(self, enum_name: &str, value: &str) -> bool
Returns whether the column has the enum default value of the given enum type.
sourcepub fn column_type_is_enum(self, enum_name: &str) -> bool
pub fn column_type_is_enum(self, enum_name: &str) -> bool
Returns whether the type of the column matches the provided enum name.
sourcepub fn column_type_family(self) -> &'a ColumnTypeFamily
pub fn column_type_family(self) -> &'a ColumnTypeFamily
The type family.
sourcepub fn column_type_family_as_enum(self) -> Option<EnumWalker<'a>>
pub fn column_type_family_as_enum(self) -> Option<EnumWalker<'a>>
Extract an Enum
column type family, or None
if the family is something else.
sourcepub fn default(self) -> Option<TableDefaultValueWalker<'a>>
pub fn default(self) -> Option<TableDefaultValueWalker<'a>>
the default value for the column.
sourcepub fn column_type(self) -> &'a ColumnType
pub fn column_type(self) -> &'a ColumnType
The full column type.
sourcepub fn column_native_type<T: Any + 'static>(self) -> Option<&'a T>
pub fn column_native_type<T: Any + 'static>(self) -> Option<&'a T>
The column native type.
sourcepub fn is_autoincrement(self) -> bool
pub fn is_autoincrement(self) -> bool
Is this column an auto-incrementing integer?
sourcepub fn is_same_column(self, other: TableColumnWalker<'_>) -> bool
pub fn is_same_column(self, other: TableColumnWalker<'_>) -> bool
Returns whether two columns are named the same and belong to the same table.
sourcepub fn is_part_of_secondary_index(self) -> bool
pub fn is_part_of_secondary_index(self) -> bool
Is this column indexed by a secondary index??
sourcepub fn is_part_of_primary_key(self) -> bool
pub fn is_part_of_primary_key(self) -> bool
Is this column a part of the table’s primary key?
sourcepub fn is_part_of_foreign_key(self) -> bool
pub fn is_part_of_foreign_key(self) -> bool
Is this column a part of one of the table’s foreign keys?
sourcepub fn is_single_primary_key(self) -> bool
pub fn is_single_primary_key(self) -> bool
Returns whether this column is the primary key. If it is only part of the primary key, this will return false.
sourcepub fn table(self) -> TableWalker<'a>
pub fn table(self) -> TableWalker<'a>
Traverse to the column’s table.
source§impl<'a> Walker<'a, ViewColumnId>
impl<'a> Walker<'a, ViewColumnId>
sourcepub fn coarsen(self) -> ColumnWalker<'a>
pub fn coarsen(self) -> ColumnWalker<'a>
Coarsen the walker into a generic column version.
sourcepub fn arity(self) -> ColumnArity
pub fn arity(self) -> ColumnArity
The nullability and arity of the column.
sourcepub fn column_has_enum_default_value(self, enum_name: &str, value: &str) -> bool
pub fn column_has_enum_default_value(self, enum_name: &str, value: &str) -> bool
Returns whether the column has the enum default value of the given enum type.
sourcepub fn column_type_is_enum(self, enum_name: &str) -> bool
pub fn column_type_is_enum(self, enum_name: &str) -> bool
Returns whether the type of the column matches the provided enum name.
sourcepub fn column_type_family(self) -> &'a ColumnTypeFamily
pub fn column_type_family(self) -> &'a ColumnTypeFamily
The type family.
sourcepub fn column_type_family_as_enum(self) -> Option<EnumWalker<'a>>
pub fn column_type_family_as_enum(self) -> Option<EnumWalker<'a>>
Extract an Enum
column type family, or None
if the family is something else.
sourcepub fn default(self) -> Option<ViewDefaultValueWalker<'a>>
pub fn default(self) -> Option<ViewDefaultValueWalker<'a>>
the default value for the column.
sourcepub fn column_type(self) -> &'a ColumnType
pub fn column_type(self) -> &'a ColumnType
The full column type.
sourcepub fn column_native_type<T: Any + 'static>(self) -> Option<&'a T>
pub fn column_native_type<T: Any + 'static>(self) -> Option<&'a T>
The column native type.
sourcepub fn is_autoincrement(self) -> bool
pub fn is_autoincrement(self) -> bool
Is this column an auto-incrementing integer?
sourcepub fn is_same_column(self, other: ViewColumnWalker<'_>) -> bool
pub fn is_same_column(self, other: ViewColumnWalker<'_>) -> bool
Returns whether two columns are named the same and belong to the same table.
sourcepub fn view(self) -> ViewWalker<'a>
pub fn view(self) -> ViewWalker<'a>
Traverse to the column’s table.
source§impl<'a> Walker<'a, Either<TableColumnId, ViewColumnId>>
impl<'a> Walker<'a, Either<TableColumnId, ViewColumnId>>
sourcepub fn refine(self) -> Either<TableColumnWalker<'a>, ViewColumnWalker<'a>> ⓘ
pub fn refine(self) -> Either<TableColumnWalker<'a>, ViewColumnWalker<'a>> ⓘ
Refines the walker to either as a table or as a view column.
sourcepub fn arity(self) -> ColumnArity
pub fn arity(self) -> ColumnArity
The nullability and arity of the column.
sourcepub fn column_has_enum_default_value(self, enum_name: &str, value: &str) -> bool
pub fn column_has_enum_default_value(self, enum_name: &str, value: &str) -> bool
Returns whether the column has the enum default value of the given enum type.
sourcepub fn column_type_is_enum(self, enum_name: &str) -> bool
pub fn column_type_is_enum(self, enum_name: &str) -> bool
Returns whether the type of the column matches the provided enum name.
sourcepub fn column_type_family(self) -> &'a ColumnTypeFamily
pub fn column_type_family(self) -> &'a ColumnTypeFamily
The type family.
sourcepub fn column_type_family_as_enum(self) -> Option<EnumWalker<'a>>
pub fn column_type_family_as_enum(self) -> Option<EnumWalker<'a>>
Extract an Enum
column type family, or None
if the family is something else.
sourcepub fn column_type(self) -> &'a ColumnType
pub fn column_type(self) -> &'a ColumnType
the full column type.
sourcepub fn column_native_type<T: Any + 'static>(self) -> Option<&'a T>
pub fn column_native_type<T: Any + 'static>(self) -> Option<&'a T>
the column native type.
sourcepub fn is_autoincrement(self) -> bool
pub fn is_autoincrement(self) -> bool
is this column an auto-incrementing integer?
sourcepub fn default(self) -> Option<DefaultValueWalker<'a>>
pub fn default(self) -> Option<DefaultValueWalker<'a>>
the default value for the column.
sourcepub fn is_same_column(self, other: ColumnWalker<'_>) -> bool
pub fn is_same_column(self, other: ColumnWalker<'_>) -> bool
returns whether two columns are named the same and belong to the same table.
sourcepub fn is_in_view(self) -> bool
pub fn is_in_view(self) -> bool
True if the column is defined in a view.
sourcepub fn description(self) -> Option<&'a str>
pub fn description(self) -> Option<&'a str>
Description (comment) of the column.
source§impl<'a> Walker<'a, TableDefaultValueId>
impl<'a> Walker<'a, TableDefaultValueId>
sourcepub fn coarsen(self) -> DefaultValueWalker<'a>
pub fn coarsen(self) -> DefaultValueWalker<'a>
Coarsen the walker into a generic column default version.
sourcepub fn column(self) -> TableColumnWalker<'a>
pub fn column(self) -> TableColumnWalker<'a>
The column where the default value is located.
sourcepub fn as_value(self) -> Option<&'a PrismaValue>
pub fn as_value(self) -> Option<&'a PrismaValue>
Return a value if a constant.
sourcepub fn as_sequence(self) -> Option<&'a str>
pub fn as_sequence(self) -> Option<&'a str>
If the value is a squence, return it
sourcepub fn is_sequence(&self) -> bool
pub fn is_sequence(&self) -> bool
True if referencing a sequence
sourcepub fn is_db_generated(&self) -> bool
pub fn is_db_generated(&self) -> bool
True if value generation is handled in the database
sourcepub fn kind(self) -> &'a DefaultKind
pub fn kind(self) -> &'a DefaultKind
The value kind enumerator
sourcepub fn constraint_name(self) -> Option<&'a str>
pub fn constraint_name(self) -> Option<&'a str>
The name of the default value constraint.
sourcepub fn inner(self) -> &'a DefaultValue
pub fn inner(self) -> &'a DefaultValue
The actual value struct
source§impl<'a> Walker<'a, ViewDefaultValueId>
impl<'a> Walker<'a, ViewDefaultValueId>
sourcepub fn coarsen(self) -> DefaultValueWalker<'a>
pub fn coarsen(self) -> DefaultValueWalker<'a>
Coarsen the walker into a generic column default version.
sourcepub fn column(self) -> ViewColumnWalker<'a>
pub fn column(self) -> ViewColumnWalker<'a>
The column where the default value is located.
sourcepub fn as_value(self) -> Option<&'a PrismaValue>
pub fn as_value(self) -> Option<&'a PrismaValue>
Return a value if a constant.
sourcepub fn as_sequence(self) -> Option<&'a str>
pub fn as_sequence(self) -> Option<&'a str>
If the value is a squence, return it
sourcepub fn is_sequence(&self) -> bool
pub fn is_sequence(&self) -> bool
True if referencing a sequence
sourcepub fn is_db_generated(&self) -> bool
pub fn is_db_generated(&self) -> bool
True if value generation is handled in the database
sourcepub fn kind(self) -> &'a DefaultKind
pub fn kind(self) -> &'a DefaultKind
The value kind enumerator
sourcepub fn constraint_name(self) -> Option<&'a str>
pub fn constraint_name(self) -> Option<&'a str>
The name of the default value constraint.
source§impl<'a> Walker<'a, Either<TableDefaultValueId, ViewDefaultValueId>>
impl<'a> Walker<'a, Either<TableDefaultValueId, ViewDefaultValueId>>
sourcepub fn refine(
self
) -> Either<TableDefaultValueWalker<'a>, ViewDefaultValueWalker<'a>> ⓘ
pub fn refine( self ) -> Either<TableDefaultValueWalker<'a>, ViewDefaultValueWalker<'a>> ⓘ
Refines the walker to either as a table or as a view column default.
sourcepub fn as_value(self) -> Option<&'a PrismaValue>
pub fn as_value(self) -> Option<&'a PrismaValue>
Return a value if a constant.
sourcepub fn as_sequence(self) -> Option<&'a str>
pub fn as_sequence(self) -> Option<&'a str>
If the value is a squence, return it
sourcepub fn is_sequence(&self) -> bool
pub fn is_sequence(&self) -> bool
True if referencing a sequence
sourcepub fn is_db_generated(&self) -> bool
pub fn is_db_generated(&self) -> bool
True if value generation is handled in the database
sourcepub fn kind(self) -> &'a DefaultKind
pub fn kind(self) -> &'a DefaultKind
The value kind enumerator
sourcepub fn constraint_name(self) -> Option<&'a str>
pub fn constraint_name(self) -> Option<&'a str>
The name of the default value constraint.
sourcepub fn value(self) -> &'a DefaultValue
pub fn value(self) -> &'a DefaultValue
The default value data
source§impl<'a> Walker<'a, EnumId>
impl<'a> Walker<'a, EnumId>
sourcepub fn variants(self) -> impl ExactSizeIterator<Item = EnumVariantWalker<'a>>
pub fn variants(self) -> impl ExactSizeIterator<Item = EnumVariantWalker<'a>>
The variants of the enum.
sourcepub fn values(self) -> impl ExactSizeIterator<Item = &'a str>
pub fn values(self) -> impl ExactSizeIterator<Item = &'a str>
The names of the variants of the enum.
sourcepub fn description(self) -> Option<&'a str>
pub fn description(self) -> Option<&'a str>
Description (comment) of the enum.
source§impl<'a> Walker<'a, EnumVariantId>
impl<'a> Walker<'a, EnumVariantId>
source§impl<'schema> Walker<'schema, ForeignKeyId>
impl<'schema> Walker<'schema, ForeignKeyId>
sourcepub fn constrained_columns(
self
) -> impl ExactSizeIterator<Item = TableColumnWalker<'schema>>
pub fn constrained_columns( self ) -> impl ExactSizeIterator<Item = TableColumnWalker<'schema>>
The foreign key columns on the referencing table.
sourcepub fn constraint_name(self) -> Option<&'schema str>
pub fn constraint_name(self) -> Option<&'schema str>
The name of the foreign key constraint.
sourcepub fn on_delete_action(self) -> ForeignKeyAction
pub fn on_delete_action(self) -> ForeignKeyAction
The ON DELETE
behaviour of the foreign key.
sourcepub fn on_update_action(self) -> ForeignKeyAction
pub fn on_update_action(self) -> ForeignKeyAction
The ON UPDATE
behaviour of the foreign key.
sourcepub fn referenced_columns(
self
) -> impl ExactSizeIterator<Item = TableColumnWalker<'schema>>
pub fn referenced_columns( self ) -> impl ExactSizeIterator<Item = TableColumnWalker<'schema>>
The columns referenced by the foreign key on the referenced table.
sourcepub fn referenced_table_name(self) -> &'schema str
pub fn referenced_table_name(self) -> &'schema str
The table the foreign key “points to”.
sourcepub fn referenced_table(self) -> TableWalker<'schema>
pub fn referenced_table(self) -> TableWalker<'schema>
The table the foreign key “points to”.
sourcepub fn table(self) -> TableWalker<'schema>
pub fn table(self) -> TableWalker<'schema>
Traverse to the referencing/constrained table.
sourcepub fn is_self_relation(self) -> bool
pub fn is_self_relation(self) -> bool
True if relation is back to the same table.
source§impl<'a> Walker<'a, IndexId>
impl<'a> Walker<'a, IndexId>
sourcepub fn column_names(self) -> impl ExactSizeIterator<Item = &'a str>
pub fn column_names(self) -> impl ExactSizeIterator<Item = &'a str>
The names of the indexed columns.
sourcepub fn columns(self) -> impl ExactSizeIterator<Item = IndexColumnWalker<'a>>
pub fn columns(self) -> impl ExactSizeIterator<Item = IndexColumnWalker<'a>>
Traverse the indexed columns.
sourcepub fn contains_column(self, column_id: TableColumnId) -> bool
pub fn contains_column(self, column_id: TableColumnId) -> bool
True if index contains the given column.
sourcepub fn index_type(self) -> IndexType
pub fn index_type(self) -> IndexType
The IndexType
sourcepub fn is_primary_key(self) -> bool
pub fn is_primary_key(self) -> bool
Is this index the primary key of the table?
sourcepub fn is_unique(self) -> bool
pub fn is_unique(self) -> bool
Is this index a unique constraint? NB: This will return false
for the primary key.
sourcepub fn table(self) -> TableWalker<'a>
pub fn table(self) -> TableWalker<'a>
Traverse to the table of the index.
source§impl<'a> Walker<'a, TableId>
impl<'a> Walker<'a, TableId>
sourcepub fn column(self, column_name: &str) -> Option<TableColumnWalker<'a>>
pub fn column(self, column_name: &str) -> Option<TableColumnWalker<'a>>
Get a column in the table, by name.
sourcepub fn columns(self) -> impl ExactSizeIterator<Item = TableColumnWalker<'a>>
pub fn columns(self) -> impl ExactSizeIterator<Item = TableColumnWalker<'a>>
Traverse the table’s columns.
sourcepub fn foreign_key_count(self) -> usize
pub fn foreign_key_count(self) -> usize
The number of foreign key constraints on the table.
sourcepub fn indexes(self) -> impl ExactSizeIterator<Item = IndexWalker<'a>>
pub fn indexes(self) -> impl ExactSizeIterator<Item = IndexWalker<'a>>
Traverse the indexes on the table.
sourcepub fn foreign_keys(self) -> impl ExactSizeIterator<Item = ForeignKeyWalker<'a>>
pub fn foreign_keys(self) -> impl ExactSizeIterator<Item = ForeignKeyWalker<'a>>
Traverse the foreign keys on the table.
sourcepub fn referencing_foreign_keys(
self
) -> impl Iterator<Item = ForeignKeyWalker<'a>>
pub fn referencing_foreign_keys( self ) -> impl Iterator<Item = ForeignKeyWalker<'a>>
Traverse foreign keys from other tables, referencing current table.
sourcepub fn foreign_key_for_column(
self,
column: TableColumnId
) -> Option<ForeignKeyWalker<'a>>
pub fn foreign_key_for_column( self, column: TableColumnId ) -> Option<ForeignKeyWalker<'a>>
Try to traverse a foreign key for a single column.
sourcepub fn namespace_id(self) -> NamespaceId
pub fn namespace_id(self) -> NamespaceId
The namespace the table belongs to.
sourcepub fn primary_key(self) -> Option<IndexWalker<'a>>
pub fn primary_key(self) -> Option<IndexWalker<'a>>
Traverse to the primary key of the table.
sourcepub fn primary_key_columns(
self
) -> Option<impl ExactSizeIterator<Item = IndexColumnWalker<'a>>>
pub fn primary_key_columns( self ) -> Option<impl ExactSizeIterator<Item = IndexColumnWalker<'a>>>
The columns that are part of the primary keys.
sourcepub fn primary_key_columns_count(self) -> usize
pub fn primary_key_columns_count(self) -> usize
How many columns are in the primary key? Returns 0 in the absence of a pk.
sourcepub fn is_partition(self) -> bool
pub fn is_partition(self) -> bool
Is the table a partition table?
sourcepub fn has_subclass(self) -> bool
pub fn has_subclass(self) -> bool
Does the table have subclasses?
sourcepub fn has_row_level_security(self) -> bool
pub fn has_row_level_security(self) -> bool
Does the table have row level security enabled?
sourcepub fn has_check_constraints(self) -> bool
pub fn has_check_constraints(self) -> bool
Does the table have check constraints?
sourcepub fn check_constraints(self) -> impl ExactSizeIterator<Item = &'a str>
pub fn check_constraints(self) -> impl ExactSizeIterator<Item = &'a str>
The check constraint names for the table.
sourcepub fn description(self) -> Option<&'a str>
pub fn description(self) -> Option<&'a str>
Description (comment) of the table.
source§impl<'a> Walker<'a, ViewId>
impl<'a> Walker<'a, ViewId>
sourcepub fn definition(self) -> Option<&'a str>
pub fn definition(self) -> Option<&'a str>
The SQL definition of the view
sourcepub fn columns(self) -> impl ExactSizeIterator<Item = ViewColumnWalker<'a>>
pub fn columns(self) -> impl ExactSizeIterator<Item = ViewColumnWalker<'a>>
Traverse the view’s columns.
sourcepub fn description(self) -> Option<&'a str>
pub fn description(self) -> Option<&'a str>
Description (comment) of the view.
Trait Implementations§
impl<'a, Id: Copy> Copy for Walker<'a, Id>
Auto Trait Implementations§
impl<'a, Id> !RefUnwindSafe for Walker<'a, Id>
impl<'a, Id> Send for Walker<'a, Id>where Id: Send,
impl<'a, Id> Sync for Walker<'a, Id>where Id: Sync,
impl<'a, Id> Unpin for Walker<'a, Id>where Id: Unpin,
impl<'a, Id> !UnwindSafe for Walker<'a, Id>
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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> 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) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
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) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
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)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.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)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.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)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.