pub struct Node<'a, N: IndexableNum, T: RTreeIndex<N>> { /* private fields */ }Expand description
An internal node in the RTree.
Implementations§
Source§impl<'a, N: IndexableNum, T: RTreeIndex<N>> Node<'a, N, T>
impl<'a, N: IndexableNum, T: RTreeIndex<N>> Node<'a, N, T>
Sourcepub fn intersects<T2: RTreeIndex<N>>(&self, other: &Node<'_, N, T2>) -> bool
pub fn intersects<T2: RTreeIndex<N>>(&self, other: &Node<'_, N, T2>) -> bool
Returns true if this node intersects another node.
Sourcepub fn children(&self) -> Option<impl Iterator<Item = Node<'_, N, T>>>
pub fn children(&self) -> Option<impl Iterator<Item = Node<'_, N, T>>>
Returns an iterator over the child nodes of this node.
Returns None if Self::is_parent is false.
Sourcepub fn children_unchecked(&self) -> impl Iterator<Item = Node<'_, N, T>>
pub fn children_unchecked(&self) -> impl Iterator<Item = Node<'_, N, T>>
Returns an iterator over the child nodes of this node. This is only valid when
Self::is_parent is true.
Sourcepub fn insertion_index(&self) -> Option<u32>
pub fn insertion_index(&self) -> Option<u32>
The original insertion index. This is only valid when this is a leaf node, which you can
check with Self::is_leaf.
Returns None if Self::is_leaf is false.
Sourcepub fn insertion_index_unchecked(&self) -> u32
pub fn insertion_index_unchecked(&self) -> u32
The original insertion index. This is only valid when this is a leaf node, which you can
check with Self::is_leaf.
Trait Implementations§
Source§impl<'a, N: Clone + IndexableNum, T: Clone + RTreeIndex<N>> Clone for Node<'a, N, T>
impl<'a, N: Clone + IndexableNum, T: Clone + RTreeIndex<N>> Clone for Node<'a, N, T>
Source§impl<'a, N: Debug + IndexableNum, T: Debug + RTreeIndex<N>> Debug for Node<'a, N, T>
impl<'a, N: Debug + IndexableNum, T: Debug + RTreeIndex<N>> Debug for Node<'a, N, T>
Source§impl<N: IndexableNum, T: RTreeIndex<N>> GeometryTrait for Node<'_, N, T>
impl<N: IndexableNum, T: RTreeIndex<N>> GeometryTrait for Node<'_, N, T>
Source§type PointType<'a> = UnimplementedPoint<N>
where
Self: 'a
type PointType<'a> = UnimplementedPoint<N> where Self: 'a
The type of each underlying Point, which implements PointTrait
Source§type LineStringType<'a> = UnimplementedLineString<N>
where
Self: 'a
type LineStringType<'a> = UnimplementedLineString<N> where Self: 'a
The type of each underlying LineString, which implements LineStringTrait
Source§type PolygonType<'a> = UnimplementedPolygon<N>
where
Self: 'a
type PolygonType<'a> = UnimplementedPolygon<N> where Self: 'a
The type of each underlying Polygon, which implements PolygonTrait
Source§type MultiPointType<'a> = UnimplementedMultiPoint<N>
where
Self: 'a
type MultiPointType<'a> = UnimplementedMultiPoint<N> where Self: 'a
The type of each underlying MultiPoint, which implements MultiPointTrait
Source§type MultiLineStringType<'a> = UnimplementedMultiLineString<N>
where
Self: 'a
type MultiLineStringType<'a> = UnimplementedMultiLineString<N> where Self: 'a
The type of each underlying MultiLineString, which implements MultiLineStringTrait
Source§type MultiPolygonType<'a> = UnimplementedMultiPolygon<N>
where
Self: 'a
type MultiPolygonType<'a> = UnimplementedMultiPolygon<N> where Self: 'a
The type of each underlying MultiPolygon, which implements MultiPolygonTrait
Source§type GeometryCollectionType<'a> = UnimplementedGeometryCollection<N>
where
Self: 'a
type GeometryCollectionType<'a> = UnimplementedGeometryCollection<N> where Self: 'a
The type of each underlying GeometryCollection, which implements GeometryCollectionTrait
Source§type RectType<'a> = Node<'a, N, T>
where
Self: 'a
type RectType<'a> = Node<'a, N, T> where Self: 'a
The type of each underlying Rect, which implements RectTrait
Source§type TriangleType<'a> = UnimplementedTriangle<N>
where
Self: 'a
type TriangleType<'a> = UnimplementedTriangle<N> where Self: 'a
The type of each underlying Triangle, which implements TriangleTrait
Source§type LineType<'a> = UnimplementedLine<N>
where
Self: 'a
type LineType<'a> = UnimplementedLine<N> where Self: 'a
The type of each underlying Line, which implements LineTrait
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
The dimension of this geometry
Source§fn as_type(
&self,
) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
fn as_type( &self, ) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
Cast this geometry to a
GeometryType enum, which allows for downcasting to a specific
typeSource§impl<N: IndexableNum, T: RTreeIndex<N>> RectTrait for Node<'_, N, T>
impl<N: IndexableNum, T: RTreeIndex<N>> RectTrait for Node<'_, N, T>
Auto Trait Implementations§
impl<'a, N, T> Freeze for Node<'a, N, T>
impl<'a, N, T> RefUnwindSafe for Node<'a, N, T>where
T: RefUnwindSafe,
N: RefUnwindSafe,
impl<'a, N, T> Send for Node<'a, N, T>where
T: Sync,
impl<'a, N, T> Sync for Node<'a, N, T>where
T: Sync,
impl<'a, N, T> Unpin for Node<'a, N, T>where
N: Unpin,
impl<'a, N, T> UnwindSafe for Node<'a, N, T>where
T: RefUnwindSafe,
N: 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