Enum sql::plan::typeconv::CastContext [−][src]
pub enum CastContext {
Implicit,
Assignment,
Explicit,
}
Expand description
Describes the context of a cast.
Variants
Implicit
Implicit casts are “no-brainer” casts that apply automatically in
expressions. They are typically lossless, such as ScalarType::Int32
to
ScalarType::Int64
.
Assignment
Assignment casts are “reasonable” casts that make sense to apply
automatically in INSERT
statements, but are surprising enough that
they don’t apply implicitly in expressions.
Explicit
Explicit casts are casts that are possible but may be surprising, like
casting ScalarType::Json
to ScalarType::Int32
, and therefore they do
not happen unless explicitly requested by the user with a cast operator.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CastContext
impl Send for CastContext
impl Sync for CastContext
impl Unpin for CastContext
impl UnwindSafe for CastContext
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more