pub struct CapCoverage { /* private fields */ }Expand description
How much of a space’s horizontal cap is covered by elements.
Implementations§
Source§impl CapCoverage
impl CapCoverage
pub fn try_new( whole_area_square_metres: f64, covered_area_square_metres: f64, elements: Vec<ObjectId>, ) -> Result<Self, SpaceError>
pub fn whole_area_square_metres(&self) -> f64
pub fn covered_area_square_metres(&self) -> f64
pub fn elements(&self) -> &[ObjectId]
Sourcepub fn covered_ratio(&self) -> f64
pub fn covered_ratio(&self) -> f64
Fraction of the cap that is covered, computed exactly.
The divisor is validated positive in Self::try_new.
Trait Implementations§
Source§impl Clone for CapCoverage
impl Clone for CapCoverage
Source§fn clone(&self) -> CapCoverage
fn clone(&self) -> CapCoverage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CapCoverage
impl Debug for CapCoverage
Source§impl PartialEq for CapCoverage
impl PartialEq for CapCoverage
impl StructuralPartialEq for CapCoverage
Auto Trait Implementations§
impl Freeze for CapCoverage
impl RefUnwindSafe for CapCoverage
impl Send for CapCoverage
impl Sync for CapCoverage
impl Unpin for CapCoverage
impl UnsafeUnpin for CapCoverage
impl UnwindSafe for CapCoverage
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