pub struct OpaqueEncoding(pub u16);
Expand description
An encoding of an array that we cannot interpret.
Vortex allows for pluggable encodings. This can lead to issues when one process produces a file using a custom encoding, and then another process without knowledge of the encoding attempts to read it.
OpaqueEncoding
allows deserializing these arrays. Many common operations will fail, but it
allows deserialization and introspection in a type-erased manner on the children and metadata.
We hold the original 16-bit encoding ID for producing helpful error messages.
Tuple Fields§
§0: u16
Trait Implementations§
Source§impl ArrayEncoding for OpaqueEncoding
impl ArrayEncoding for OpaqueEncoding
fn id(&self) -> EncodingId
Source§fn canonicalize(&self, _array: Array) -> VortexResult<Canonical>
fn canonicalize(&self, _array: Array) -> VortexResult<Canonical>
Flatten the given array.
Source§fn with_dyn(
&self,
_array: &Array,
_f: &mut dyn for<'b> FnMut(&'b (dyn ArrayTrait + 'b)) -> VortexResult<()>,
) -> VortexResult<()>
fn with_dyn( &self, _array: &Array, _f: &mut dyn for<'b> FnMut(&'b (dyn ArrayTrait + 'b)) -> VortexResult<()>, ) -> VortexResult<()>
Unwrap the provided array into an implementation of ArrayTrait
Source§impl Clone for OpaqueEncoding
impl Clone for OpaqueEncoding
Source§fn clone(&self) -> OpaqueEncoding
fn clone(&self) -> OpaqueEncoding
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OpaqueEncoding
impl Debug for OpaqueEncoding
impl Copy for OpaqueEncoding
Auto Trait Implementations§
impl Freeze for OpaqueEncoding
impl RefUnwindSafe for OpaqueEncoding
impl Send for OpaqueEncoding
impl Sync for OpaqueEncoding
impl Unpin for OpaqueEncoding
impl UnwindSafe for OpaqueEncoding
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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