rtz_core/geo/admin/shared.rs
1//! The `shared` module. Contains types and helpers pertinent to all admin implementations.
2
3// This module is mostly used for cache preprocessing, which is expensive during coverage, so
4// it is not included in the coverage report.
5#![cfg(not(tarpaulin_include))]
6
7use crate::geo::shared::{HasGeometry, HasProperties};
8
9// Types.
10
11// Traits.
12
13/// A trait for types that are an admin and have a [`Geometry`].
14///
15/// Helps abstract away this property so the helper methods can be generalized.
16pub trait IsAdmin: HasGeometry + HasProperties {
17 /// Get the `name` of the [`IsAdmin`].
18 fn name(&self) -> &str;
19}