Struct h3ron::collections::H3CompactedVec[][src]

pub struct H3CompactedVec { /* fields omitted */ }

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]

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]

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]

pub fn iter_compacted_indexes(&self) -> H3CompactedVecCompactedIterator<'_>[src]

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<'_>
[src]

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]

impl From<Vec<u64, Global>> for H3CompactedVec[src]

impl FromIterator<Index> for H3CompactedVec[src]

impl FromIterator<u64> for H3CompactedVec[src]

impl PartialEq<H3CompactedVec> for H3CompactedVec[src]

impl Serialize for H3CompactedVec[src]

impl StructuralPartialEq for H3CompactedVec[src]

impl ToLinkedPolygons for H3CompactedVec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.