Enum risinglight::parser::Expr
source · pub enum Expr {
Show 56 variants
Identifier(Ident),
CompoundIdentifier(Vec<Ident, Global>),
JsonAccess {
left: Box<Expr, Global>,
operator: JsonOperator,
right: Box<Expr, Global>,
},
CompositeAccess {
expr: Box<Expr, Global>,
key: Ident,
},
IsFalse(Box<Expr, Global>),
IsNotFalse(Box<Expr, Global>),
IsTrue(Box<Expr, Global>),
IsNotTrue(Box<Expr, Global>),
IsNull(Box<Expr, Global>),
IsNotNull(Box<Expr, Global>),
IsUnknown(Box<Expr, Global>),
IsNotUnknown(Box<Expr, Global>),
IsDistinctFrom(Box<Expr, Global>, Box<Expr, Global>),
IsNotDistinctFrom(Box<Expr, Global>, Box<Expr, Global>),
InList {
expr: Box<Expr, Global>,
list: Vec<Expr, Global>,
negated: bool,
},
InSubquery {
expr: Box<Expr, Global>,
subquery: Box<Query, Global>,
negated: bool,
},
InUnnest {
expr: Box<Expr, Global>,
array_expr: Box<Expr, Global>,
negated: bool,
},
Between {
expr: Box<Expr, Global>,
negated: bool,
low: Box<Expr, Global>,
high: Box<Expr, Global>,
},
BinaryOp {
left: Box<Expr, Global>,
op: BinaryOperator,
right: Box<Expr, Global>,
},
Like {
negated: bool,
expr: Box<Expr, Global>,
pattern: Box<Expr, Global>,
escape_char: Option<char>,
},
ILike {
negated: bool,
expr: Box<Expr, Global>,
pattern: Box<Expr, Global>,
escape_char: Option<char>,
},
SimilarTo {
negated: bool,
expr: Box<Expr, Global>,
pattern: Box<Expr, Global>,
escape_char: Option<char>,
},
AnyOp(Box<Expr, Global>),
AllOp(Box<Expr, Global>),
UnaryOp {
op: UnaryOperator,
expr: Box<Expr, Global>,
},
Cast {
expr: Box<Expr, Global>,
data_type: DataType,
},
TryCast {
expr: Box<Expr, Global>,
data_type: DataType,
},
SafeCast {
expr: Box<Expr, Global>,
data_type: DataType,
},
AtTimeZone {
timestamp: Box<Expr, Global>,
time_zone: String,
},
Extract {
field: DateTimeField,
expr: Box<Expr, Global>,
},
Ceil {
expr: Box<Expr, Global>,
field: DateTimeField,
},
Floor {
expr: Box<Expr, Global>,
field: DateTimeField,
},
Position {
expr: Box<Expr, Global>,
in: Box<Expr, Global>,
},
Substring {
expr: Box<Expr, Global>,
substring_from: Option<Box<Expr, Global>>,
substring_for: Option<Box<Expr, Global>>,
},
Trim {
expr: Box<Expr, Global>,
trim_where: Option<TrimWhereField>,
trim_what: Option<Box<Expr, Global>>,
},
Overlay {
expr: Box<Expr, Global>,
overlay_what: Box<Expr, Global>,
overlay_from: Box<Expr, Global>,
overlay_for: Option<Box<Expr, Global>>,
},
Collate {
expr: Box<Expr, Global>,
collation: ObjectName,
},
Nested(Box<Expr, Global>),
Value(Value),
TypedString {
data_type: DataType,
value: String,
},
MapAccess {
column: Box<Expr, Global>,
keys: Vec<Expr, Global>,
},
Function(Function),
AggregateExpressionWithFilter {
expr: Box<Expr, Global>,
filter: Box<Expr, Global>,
},
Case {
operand: Option<Box<Expr, Global>>,
conditions: Vec<Expr, Global>,
results: Vec<Expr, Global>,
else_result: Option<Box<Expr, Global>>,
},
Exists {
subquery: Box<Query, Global>,
negated: bool,
},
Subquery(Box<Query, Global>),
ArraySubquery(Box<Query, Global>),
ListAgg(ListAgg),
ArrayAgg(ArrayAgg),
GroupingSets(Vec<Vec<Expr, Global>, Global>),
Cube(Vec<Vec<Expr, Global>, Global>),
Rollup(Vec<Vec<Expr, Global>, Global>),
Tuple(Vec<Expr, Global>),
ArrayIndex {
obj: Box<Expr, Global>,
indexes: Vec<Expr, Global>,
},
Array(Array),
Interval {
value: Box<Expr, Global>,
leading_field: Option<DateTimeField>,
leading_precision: Option<u64>,
last_field: Option<DateTimeField>,
fractional_seconds_precision: Option<u64>,
},
}Expand description
An SQL expression of any type.
The parser does not distinguish between expressions of different types
(e.g. boolean vs string), so the caller must handle expressions of
inappropriate type, like WHERE 1 or SELECT 1=1, as necessary.
Variants§
Identifier(Ident)
Identifier e.g. table name or column name
CompoundIdentifier(Vec<Ident, Global>)
Multi-part identifier, e.g. table_alias.column or schema.table.col
JsonAccess
JSON access (postgres) eg: data->‘tags’
CompositeAccess
CompositeAccess (postgres) eg: SELECT (information_schema._pg_expandarray(array[‘i’,‘i’])).n
IsFalse(Box<Expr, Global>)
IS FALSE operator
IsNotFalse(Box<Expr, Global>)
IS NOT FALSE operator
IsTrue(Box<Expr, Global>)
IS TRUE operator
IsNotTrue(Box<Expr, Global>)
IS NOT TRUE operator
IsNull(Box<Expr, Global>)
IS NULL operator
IsNotNull(Box<Expr, Global>)
IS NOT NULL operator
IsUnknown(Box<Expr, Global>)
IS UNKNOWN operator
IsNotUnknown(Box<Expr, Global>)
IS NOT UNKNOWN operator
IsDistinctFrom(Box<Expr, Global>, Box<Expr, Global>)
IS DISTINCT FROM operator
IsNotDistinctFrom(Box<Expr, Global>, Box<Expr, Global>)
IS NOT DISTINCT FROM operator
InList
[ NOT ] IN (val1, val2, ...)
InSubquery
[ NOT ] IN (SELECT ...)
InUnnest
[ NOT ] IN UNNEST(array_expression)
Between
<expr> [ NOT ] BETWEEN <low> AND <high>
BinaryOp
Binary operation e.g. 1 + 1 or foo > bar
Like
LIKE
ILike
ILIKE (case-insensitive LIKE)
SimilarTo
SIMILAR TO regex
AnyOp(Box<Expr, Global>)
Any operation e.g. 1 ANY (1) or foo > ANY(bar), It will be wrapped in the right side of BinaryExpr
AllOp(Box<Expr, Global>)
ALL operation e.g. 1 ALL (1) or foo > ALL(bar), It will be wrapped in the right side of BinaryExpr
UnaryOp
Unary operation e.g. NOT foo
Cast
CAST an expression to a different data type e.g. CAST(foo AS VARCHAR(123))
TryCast
TRY_CAST an expression to a different data type e.g. TRY_CAST(foo AS VARCHAR(123))
SafeCast
SAFE_CAST an expression to a different data type e.g. SAFE_CAST(foo AS FLOAT64)
AtTimeZone
AT a timestamp to a different timezone e.g. FROM_UNIXTIME(0) AT TIME ZONE 'UTC-06:00'
Extract
EXTRACT(DateTimeField FROM
Ceil
CEIL(
Floor
FLOOR(
Position
POSITION(
Substring
Fields
SUBSTRING(
Trim
Fields
trim_where: Option<TrimWhereField>TRIM([BOTH | LEADING | TRAILING] [
Or
TRIM(
Overlay
Fields
OVERLAY(
Collate
expr COLLATE collation
Nested(Box<Expr, Global>)
Nested expression e.g. (foo > bar) or (1)
Value(Value)
A literal value, such as string, number, date or NULL
TypedString
A constant of form <data_type> 'value'.
This can represent ANSI SQL DATE, TIME, and TIMESTAMP literals (such as DATE '2020-01-01'),
as well as constants of other types (a non-standard PostgreSQL extension).
MapAccess
Access a map-like object by field (e.g. column['field'] or column[4]
Note that depending on the dialect, struct like accesses may be
parsed as [ArrayIndex] or [MapAccess]
https://clickhouse.com/docs/en/sql-reference/data-types/map/
Function(Function)
Scalar function call e.g. LEFT(foo, 5)
AggregateExpressionWithFilter
Aggregate function with filter
Case
Fields
CASE [<operand>] WHEN <condition> THEN <result> ... [ELSE <result>] END
Note we only recognize a complete single expression as <condition>,
not < 0 nor 1, 2, 3 as allowed in a <simple when clause> per
https://jakewheat.github.io/sql-overview/sql-2011-foundation-grammar.html#simple-when-clause
Exists
An exists expression [ NOT ] EXISTS(SELECT ...), used in expressions like
WHERE [ NOT ] EXISTS (SELECT ...).
Subquery(Box<Query, Global>)
A parenthesized subquery (SELECT ...), used in expression like
SELECT (subquery) AS x or WHERE (subquery) = x
ArraySubquery(Box<Query, Global>)
An array subquery constructor, e.g. SELECT ARRAY(SELECT 1 UNION SELECT 2)
ListAgg(ListAgg)
The LISTAGG function SELECT LISTAGG(...) WITHIN GROUP (ORDER BY ...)
ArrayAgg(ArrayAgg)
The ARRAY_AGG function SELECT ARRAY_AGG(... ORDER BY ...)
GroupingSets(Vec<Vec<Expr, Global>, Global>)
The GROUPING SETS expr.
Cube(Vec<Vec<Expr, Global>, Global>)
The CUBE expr.
Rollup(Vec<Vec<Expr, Global>, Global>)
The ROLLUP expr.
Tuple(Vec<Expr, Global>)
ROW / TUPLE a single value, such as SELECT (1, 2)
ArrayIndex
An array index expression e.g. (ARRAY[1, 2])[1] or (current_schemas(FALSE))[1]
Array(Array)
An array expression e.g. ARRAY[1, 2]
Interval
INTERVAL literals, roughly in the following format:
INTERVAL '<value>' [ <leading_field> [ (<leading_precision>) ] ] [ TO <last_field> [ (<fractional_seconds_precision>) ] ],
e.g. INTERVAL '123:45.67' MINUTE(3) TO SECOND(2).
The parser does not validate the <value>, nor does it ensure
that the <leading_field> units >= the units in <last_field>,
so the user will have to reject intervals like HOUR TO YEAR.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Expr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Expr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq<Expr> for Expr
impl PartialEq<Expr> for Expr
source§impl Serialize for Expr
impl Serialize for Expr
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
§impl<T> Conv for T
impl<T> Conv for T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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 + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
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> 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<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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,
§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,
§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.