pub trait ReferenceCenter:
Copy
+ Clone
+ Debug {
type Params: Clone + Debug + Default + PartialEq;
// Required method
fn center_name() -> &'static str;
}Expand description
A trait for defining a reference center (coordinate origin).
§Associated Types
Params: Runtime parameters for this center. Use()for centers that don’t need parameters. For parameterized centers, this carries the required data.
§Implementing
use affn::centers::ReferenceCenter;
#[derive(Debug, Copy, Clone)]
pub struct MyCenter;
impl ReferenceCenter for MyCenter {
type Params = ();
fn center_name() -> &'static str {
"MyCenter"
}
}Required Associated Types§
Required Methods§
Sourcefn center_name() -> &'static str
fn center_name() -> &'static str
Returns the canonical name of this reference center.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.