// Copyright (C) 2025 Christian Mauduit <ufoot@ufoot.org>

/// Trait for 2D structures that have dimensions.
///
/// This trait provides a uniform interface for querying the dimensions
/// of 2D grids and meshes.
///
/// # Example
///
/// ```
/// use shortestpath::mesh_2d::{Shape2D, Full2D};
///
/// let mesh = Full2D::new(10, 8);
/// let (width, height) = mesh.shape();
/// assert_eq!(width, 10);
/// assert_eq!(height, 8);
/// ```
pub trait Shape2D {
    /// Returns the dimensions of this 2D structure.
    ///
    /// # Returns
    ///
    /// A tuple `(width, height)` representing the dimensions
    fn shape(&self) -> (usize, usize);
}
