pub struct ResolvedCast { /* private fields */ }Expand description
A conversion’s immutable selection, without retaining a row value or a catalog decision.
Implementations§
Source§impl ResolvedCast
impl ResolvedCast
Sourcepub fn select(source: &ColumnType, target: &ColumnType) -> Option<Self>
pub fn select(source: &ColumnType, target: &ColumnType) -> Option<Self>
Select builtin scalar kernels whose identities do not depend on a live catalog or session setting. Temporal conversions still consult live settings on every row.
Sourcepub fn numeric(&self) -> Option<NumericCast>
pub fn numeric(&self) -> Option<NumericCast>
The narrower numeric selection exposed by the existing numeric cast API.
Sourcepub fn evaluate_with_catalog(
&self,
value: &Value,
source_name: &str,
target_name: &str,
engine: Option<&dyn EngineHook>,
control: &ProductionControl<'_>,
) -> Result<Produced<Value>>
pub fn evaluate_with_catalog( &self, value: &Value, source_name: &str, target_name: &str, engine: Option<&dyn EngineHook>, control: &ProductionControl<'_>, ) -> Result<Produced<Value>>
Reuse only type selection. The original source and target spellings must identify this selection; borrowing them preserves fallback callback/error order without constructing another name. Current callbacks, cancellation, values and allocation admission remain part of each evaluation.
Trait Implementations§
Source§impl Clone for ResolvedCast
impl Clone for ResolvedCast
Auto Trait Implementations§
impl Freeze for ResolvedCast
impl RefUnwindSafe for ResolvedCast
impl Send for ResolvedCast
impl Sync for ResolvedCast
impl Unpin for ResolvedCast
impl UnsafeUnpin for ResolvedCast
impl UnwindSafe for ResolvedCast
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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 more