pub struct Layer01<'a, S: DecodeState = Lazy> {
pub name: &'a str,
pub extent: u32,
/* private fields */
}Expand description
Representation of an MLT feature table layer with tag 0x01 during decoding.
The type parameter S controls how columns are stored:
-
Layer01<'a>/Layer01<'a, Lazy>(default) — columns areLazyParsedenums that may be raw or decoded. UseLayer01::decode_allto transition toLayer01<Parsed>. -
Layer01<'a, Parsed>— all columns are fully decoded. The fieldsid,geometry, andpropertieshold the parsed types directly, allowing infallible readonly access. There is aParsedLayer01<'a>type alias for this.
Fields§
§name: &'a str§extent: u32Implementations§
Source§impl<'a> Layer01<'a, Lazy>
impl<'a> Layer01<'a, Lazy>
Sourcepub fn iterate_prop_names(&self) -> impl Iterator<Item = PropName<'a>> + '_
pub fn iterate_prop_names(&self) -> impl Iterator<Item = PropName<'a>> + '_
Iterate over the property column names of this layer, in order.
Regular columns yield one PropName; SharedDict columns yield one name per
sub-item. Names are available even before any column data has been decoded.
Pair with FeatureRef::iter_all_properties to associate per-feature
values with their column names.
Source§impl<'a> Layer01<'a, Parsed>
impl<'a> Layer01<'a, Parsed>
Sourcepub fn iter_features(&self) -> Layer01FeatureIter<'_, 'a>
pub fn iter_features(&self) -> Layer01FeatureIter<'_, 'a>
Iterate over all features in this fully-decoded layer via a LendingIterator.
Yields one MltResult<FeatureRef> per feature. Geometry decoding can
fail, hence the Result wrapper.
let mut iter = parsed.iter_features();
while let Some(feat) = iter.next() {
let feat = feat?;
for col in feat.iter_properties() {
// or use iter_all_properties() to include Nones
}
}All inner iterators — FeatureRef::iter_properties,
FeatureRef::iter_all_properties, and the name iterators — implement the
standard std::iter::Iterator trait and compose normally.
Sourcepub fn iterate_prop_names(&self) -> impl Iterator<Item = PropName<'a>> + '_
pub fn iterate_prop_names(&self) -> impl Iterator<Item = PropName<'a>> + '_
Iterate over the property column names of this layer, in order.
See Layer01::iterate_prop_names for details.
Source§impl<'a> Layer01<'a, Lazy>
impl<'a> Layer01<'a, Lazy>
Sourcepub fn decode_all(self, dec: &mut Decoder) -> MltResult<ParsedLayer01<'a>>
pub fn decode_all(self, dec: &mut Decoder) -> MltResult<ParsedLayer01<'a>>
Decode all columns and transition to Layer01<Parsed>.
Consumes self (a Layer01<Lazy>) and returns a Layer01<Parsed> where every
column field holds its parsed value directly, enabling infallible readonly access.
Source§impl Layer01<'_, Parsed>
impl Layer01<'_, Parsed>
Sourcepub fn geometry_values(&self) -> &GeometryValues
pub fn geometry_values(&self) -> &GeometryValues
Returns the decoded geometry buffer for this layer.
Provides access to the columnar geometry arrays (vertex buffer, offset arrays, geometry
types) for advanced use cases such as building typed arrays for WebAssembly or
performing spatial indexing. For iterating feature geometries as geo_types values,
prefer iter_features instead.
Sourcepub fn into_tile(self, dec: &mut Decoder) -> MltResult<TileLayer>
pub fn into_tile(self, dec: &mut Decoder) -> MltResult<TileLayer>
Decode and convert into a row-oriented TileLayer, charging every
heap allocation against dec.
pub fn feature_count(&self) -> usize
Trait Implementations§
Source§impl<'a, S: DecodeState> Analyze for Layer01<'a, S>
impl<'a, S: DecodeState> Analyze for Layer01<'a, S>
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))
cb with the StreamMeta of every stream contained in self.
Default implementation is a no-op (types that hold no streams).Auto Trait Implementations§
impl<'a, S> Freeze for Layer01<'a, S>where
<S as DecodeState>::LazyOrParsed<RawGeometry<'a>, GeometryValues>: Freeze,
<S as DecodeState>::LazyOrParsed<RawId<'a>, ParsedId<'a>>: Freeze,
impl<'a, S> RefUnwindSafe for Layer01<'a, S>where
<S as DecodeState>::LazyOrParsed<RawGeometry<'a>, GeometryValues>: RefUnwindSafe,
<S as DecodeState>::LazyOrParsed<RawId<'a>, ParsedId<'a>>: RefUnwindSafe,
<S as DecodeState>::LazyOrParsed<RawProperty<'a>, ParsedProperty<'a>>: RefUnwindSafe,
impl<'a, S> Send for Layer01<'a, S>where
<S as DecodeState>::LazyOrParsed<RawGeometry<'a>, GeometryValues>: Send,
<S as DecodeState>::LazyOrParsed<RawId<'a>, ParsedId<'a>>: Send,
<S as DecodeState>::LazyOrParsed<RawProperty<'a>, ParsedProperty<'a>>: Send,
impl<'a, S> Sync for Layer01<'a, S>where
<S as DecodeState>::LazyOrParsed<RawGeometry<'a>, GeometryValues>: Sync,
<S as DecodeState>::LazyOrParsed<RawId<'a>, ParsedId<'a>>: Sync,
<S as DecodeState>::LazyOrParsed<RawProperty<'a>, ParsedProperty<'a>>: Sync,
impl<'a, S> Unpin for Layer01<'a, S>where
<S as DecodeState>::LazyOrParsed<RawGeometry<'a>, GeometryValues>: Unpin,
<S as DecodeState>::LazyOrParsed<RawId<'a>, ParsedId<'a>>: Unpin,
<S as DecodeState>::LazyOrParsed<RawProperty<'a>, ParsedProperty<'a>>: Unpin,
impl<'a, S> UnsafeUnpin for Layer01<'a, S>where
<S as DecodeState>::LazyOrParsed<RawGeometry<'a>, GeometryValues>: UnsafeUnpin,
<S as DecodeState>::LazyOrParsed<RawId<'a>, ParsedId<'a>>: UnsafeUnpin,
impl<'a, S> UnwindSafe for Layer01<'a, S>where
<S as DecodeState>::LazyOrParsed<RawGeometry<'a>, GeometryValues>: UnwindSafe,
<S as DecodeState>::LazyOrParsed<RawId<'a>, ParsedId<'a>>: UnwindSafe,
<S as DecodeState>::LazyOrParsed<RawProperty<'a>, ParsedProperty<'a>>: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.