pub enum EncDec<Raw, Parsed> {
Raw(Raw),
Parsed(Parsed),
ParsingFailed,
}Expand description
Shared wrapper for values that may still be in the original (raw) format or
already parsed (but still columnar).
Used by: Id, Geometry, Property, and eventually - SharedDictItem
Variants§
Implementations§
Source§impl<Raw: Decode<Parsed>, Parsed> EncDec<Raw, Parsed>
impl<Raw: Decode<Parsed>, Parsed> EncDec<Raw, Parsed>
Sourcepub fn decode(&mut self, decoder: &mut Decoder) -> MltResult<&mut Parsed>
pub fn decode(&mut self, decoder: &mut Decoder) -> MltResult<&mut Parsed>
Decode in place, replacing the raw value with the parsed result.
Sourcepub fn into_parsed(self, decoder: &mut Decoder) -> MltResult<Parsed>
pub fn into_parsed(self, decoder: &mut Decoder) -> MltResult<Parsed>
Consume and return the parsed value, decoding if currently raw.
pub fn as_parsed(&self) -> MltResult<&Parsed>
Source§impl<'a> EncDec<RawGeometry<'a>, GeometryValues>
impl<'a> EncDec<RawGeometry<'a>, GeometryValues>
Source§impl<'a> EncDec<RawId<'a>, IdValues>
impl<'a> EncDec<RawId<'a>, IdValues>
pub fn new_raw(presence: RawPresence<'a>, value: RawIdValue<'a>) -> Self
Trait Implementations§
Source§impl<Raw: Analyze, Parsed: Analyze> Analyze for EncDec<Raw, Parsed>
impl<Raw: Analyze, Parsed: Analyze> Analyze for EncDec<Raw, Parsed>
fn collect_statistic(&self, stat: StatType) -> usize
Source§fn for_each_stream(&self, cb: &mut dyn FnMut(StreamMeta))
fn for_each_stream(&self, cb: &mut dyn FnMut(StreamMeta))
Call
cb with the StreamMeta of every stream contained in self.
Default implementation is a no-op (types that hold no streams).Source§impl PartialEq<EncDec<RawGeometry<'_>, GeometryValues>> for GeometryValues
impl PartialEq<EncDec<RawGeometry<'_>, GeometryValues>> for GeometryValues
Source§impl PartialEq<EncDec<RawProperty<'_>, ParsedProperty<'_>>> for StagedProperty
impl PartialEq<EncDec<RawProperty<'_>, ParsedProperty<'_>>> for StagedProperty
impl<Raw, Parsed> StructuralPartialEq for EncDec<Raw, Parsed>
Auto Trait Implementations§
impl<Raw, Parsed> Freeze for EncDec<Raw, Parsed>
impl<Raw, Parsed> RefUnwindSafe for EncDec<Raw, Parsed>where
Raw: RefUnwindSafe,
Parsed: RefUnwindSafe,
impl<Raw, Parsed> Send for EncDec<Raw, Parsed>
impl<Raw, Parsed> Sync for EncDec<Raw, Parsed>
impl<Raw, Parsed> Unpin for EncDec<Raw, Parsed>
impl<Raw, Parsed> UnsafeUnpin for EncDec<Raw, Parsed>where
Raw: UnsafeUnpin,
Parsed: UnsafeUnpin,
impl<Raw, Parsed> UnwindSafe for EncDec<Raw, Parsed>where
Raw: UnwindSafe,
Parsed: UnwindSafe,
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