Struct h3ron::collections::H3CompactedVec [−][src]
structure to keep compacted h3ron indexes to allow more or less efficient adding of further indexes
Implementations
impl<'a> H3CompactedVec
[src]
pub fn new() -> H3CompactedVec
[src]
pub fn append(&mut self, other: &mut Self, compact: bool)
[src]
append the contents of another Stack to this one
Indexes get moved, see Vec::append
will trigger a re-compacting when compact is true
pub fn compact(&mut self)
[src]
pub fn append_to_resolution(
&mut self,
resolution: u8,
h3indexes: &mut Vec<H3Index>,
compact: bool
)
[src]
&mut self,
resolution: u8,
h3indexes: &mut Vec<H3Index>,
compact: bool
)
append the contents of a vector
Indexes get moved, see Vec::append
pub fn len(&self) -> usize
[src]
pub fn len_resolutions(&self) -> Vec<usize>
[src]
length of the vectors for all resolutions. The index of the vec is the resolution
pub fn is_empty(&self) -> bool
[src]
pub fn contains(&self, h3index: H3Index) -> bool
[src]
check if the stack contains the index or any of its parents
This function is pretty inefficient.
pub fn add_index(&mut self, h3_index: H3Index, compact: bool)
[src]
add a single h3 index
will trigger a re-compacting when compact
is set
pub fn add_index_to_resolution(
&mut self,
h3_index: H3Index,
resolution: u8,
compact: bool
)
[src]
&mut self,
h3_index: H3Index,
resolution: u8,
compact: bool
)
add a single h3ron index
the resolution
parameter must match the resolution of the index. This method
only exists to skip the resolution check of add_index
.
pub fn add_indexes(&mut self, h3_indexes: &[H3Index], compact: bool)
[src]
pub fn add_indexes_from_iter<T: IntoIterator<Item = H3Index>>(
&mut self,
iter: T,
compact: bool
)
[src]
&mut self,
iter: T,
compact: bool
)
pub fn iter_compacted_indexes(&self) -> H3CompactedVecCompactedIterator<'_>ⓘNotable traits for H3CompactedVecCompactedIterator<'a>
impl<'a> Iterator for H3CompactedVecCompactedIterator<'a> type Item = H3Index;
[src]
Notable traits for H3CompactedVecCompactedIterator<'a>
impl<'a> Iterator for H3CompactedVecCompactedIterator<'a> type Item = H3Index;
iterate over the compacted (or not, depending on if compact
was called) contents
pub fn get_compacted_indexes_at_resolution(&self, resolution: u8) -> &[H3Index]
[src]
get the compacted indexes of the given resolution
parent indexes at lower resolutions will not be uncompacted
pub fn iter_uncompacted_indexes(
&self,
resolution: u8
) -> H3CompactedVecUncompactedIterator<'_>ⓘNotable traits for H3CompactedVecUncompactedIterator<'a>
impl<'a> Iterator for H3CompactedVecUncompactedIterator<'a> type Item = H3Index;
[src]
&self,
resolution: u8
) -> H3CompactedVecUncompactedIterator<'_>ⓘ
Notable traits for H3CompactedVecUncompactedIterator<'a>
impl<'a> Iterator for H3CompactedVecUncompactedIterator<'a> type Item = H3Index;
iterate over the uncompacted indexes.
indexes at lower resolutions will be decompacted, indexes at higher resolutions will be ignored.
pub fn dedup(&mut self)
[src]
deduplicate the internal h3index vector
pub fn finest_resolution_contained(&self) -> Option<u8>
[src]
the finest resolution contained
Trait Implementations
impl Debug for H3CompactedVec
[src]
impl Default for H3CompactedVec
[src]
impl<'de> Deserialize<'de> for H3CompactedVec
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<Vec<u64, Global>> for H3CompactedVec
[src]
impl FromIterator<Index> for H3CompactedVec
[src]
fn from_iter<T: IntoIterator<Item = Index>>(iter: T) -> Self
[src]
impl FromIterator<u64> for H3CompactedVec
[src]
fn from_iter<T: IntoIterator<Item = H3Index>>(iter: T) -> Self
[src]
impl PartialEq<H3CompactedVec> for H3CompactedVec
[src]
fn eq(&self, other: &H3CompactedVec) -> bool
[src]
fn ne(&self, other: &H3CompactedVec) -> bool
[src]
impl Serialize for H3CompactedVec
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for H3CompactedVec
[src]
impl ToLinkedPolygons for H3CompactedVec
[src]
Auto Trait Implementations
impl RefUnwindSafe for H3CompactedVec
impl Send for H3CompactedVec
impl Sync for H3CompactedVec
impl Unpin for H3CompactedVec
impl UnwindSafe for H3CompactedVec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,