pub struct ShapeResolver { /* private fields */ }Expand description
Resolves differences between source and target shapes.
Used when reading data that was written with an older shape version using a newer shape, or vice versa.
Implementations§
Source§impl ShapeResolver
impl ShapeResolver
Sourcepub fn new(source: RowShape, target: RowShape) -> Option<Self>
pub fn new(source: RowShape, target: RowShape) -> Option<Self>
Create a resolver to read data from source shape as target shape.
Returns None if the shapes are incompatible (e.g., type mismatch on same-named field without valid widening path).
Sourcepub fn mappings(&self) -> &[FieldMapping]
pub fn mappings(&self) -> &[FieldMapping]
Get the field mappings
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Check if this is an identity mapping (source == target)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShapeResolver
impl RefUnwindSafe for ShapeResolver
impl Send for ShapeResolver
impl Sync for ShapeResolver
impl Unpin for ShapeResolver
impl UnsafeUnpin for ShapeResolver
impl UnwindSafe for ShapeResolver
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> 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>
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