pub struct GeometryTypeAndDimensionsSet { /* private fields */ }Expand description
A set containing GeometryTypeAndDimensions values
This set is conceptually similar to HashSet<GeometryTypeAndDimensions> but
uses a compact bitset representation for efficiency.
This set only supports the standard dimensions: XY, XYZ, XYM, and XYZM.
Unknown dimensions (other than these four standard types) are not supported
and will be rejected by insert or silently ignored by
insert_or_ignore.
Implementations§
Source§impl GeometryTypeAndDimensionsSet
impl GeometryTypeAndDimensionsSet
pub fn new() -> Self
Sourcepub fn insert(
&mut self,
type_and_dim: &GeometryTypeAndDimensions,
) -> Result<(), SedonaGeometryError>
pub fn insert( &mut self, type_and_dim: &GeometryTypeAndDimensions, ) -> Result<(), SedonaGeometryError>
Insert a geometry type and dimensions into the set.
Returns an error if the dimensions are unknown (not one of XY, XYZ, XYM, or XYZM).
Only the standard four dimension types are supported; attempting to insert
a geometry with Dimensions::Unknown(_) will result in an error.
Sourcepub fn insert_or_ignore(&mut self, type_and_dim: &GeometryTypeAndDimensions)
pub fn insert_or_ignore(&mut self, type_and_dim: &GeometryTypeAndDimensions)
Insert a geometry type and dimensions into the set, ignoring unknown dimensions.
If the dimensions are unknown (not one of XY, XYZ, XYM, or XYZM), this method silently ignores the insertion without returning an error. This is useful when processing data that may contain unsupported dimension types that should be skipped rather than causing an error.
Sourcepub fn iter(&self) -> GeometryTypeSetIter ⓘ
pub fn iter(&self) -> GeometryTypeSetIter ⓘ
Returns an iterator over the geometry types in the set.
Trait Implementations§
Source§impl Clone for GeometryTypeAndDimensionsSet
impl Clone for GeometryTypeAndDimensionsSet
Source§fn clone(&self) -> GeometryTypeAndDimensionsSet
fn clone(&self) -> GeometryTypeAndDimensionsSet
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GeometryTypeAndDimensionsSet
impl Debug for GeometryTypeAndDimensionsSet
Source§impl Default for GeometryTypeAndDimensionsSet
impl Default for GeometryTypeAndDimensionsSet
Source§fn default() -> GeometryTypeAndDimensionsSet
fn default() -> GeometryTypeAndDimensionsSet
Source§impl<'de> Deserialize<'de> for GeometryTypeAndDimensionsSet
impl<'de> Deserialize<'de> for GeometryTypeAndDimensionsSet
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for GeometryTypeAndDimensionsSet
impl PartialEq for GeometryTypeAndDimensionsSet
Source§fn eq(&self, other: &GeometryTypeAndDimensionsSet) -> bool
fn eq(&self, other: &GeometryTypeAndDimensionsSet) -> bool
self and other values to be equal, and is used by ==.impl Eq for GeometryTypeAndDimensionsSet
impl StructuralPartialEq for GeometryTypeAndDimensionsSet
Auto Trait Implementations§
impl Freeze for GeometryTypeAndDimensionsSet
impl RefUnwindSafe for GeometryTypeAndDimensionsSet
impl Send for GeometryTypeAndDimensionsSet
impl Sync for GeometryTypeAndDimensionsSet
impl Unpin for GeometryTypeAndDimensionsSet
impl UnsafeUnpin for GeometryTypeAndDimensionsSet
impl UnwindSafe for GeometryTypeAndDimensionsSet
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.