pub trait Spacing: Default {
type Unit: Unit + Clone;
// Required methods
fn left(self, value: impl Into<Self::Unit>) -> Self;
fn right(self, value: impl Into<Self::Unit>) -> Self;
fn top(self, value: impl Into<Self::Unit>) -> Self;
fn bottom(self, value: impl Into<Self::Unit>) -> Self;
// Provided methods
fn x(self, value: impl Into<Self::Unit>) -> Self { ... }
fn y(self, value: impl Into<Self::Unit>) -> Self { ... }
fn horizontal(self, value: impl Into<Self::Unit>) -> Self { ... }
fn vertical(self, value: impl Into<Self::Unit>) -> Self { ... }
fn all(self, value: impl Into<Self::Unit>) -> Self { ... }
fn zero(self) -> Self { ... }
fn half(self) -> Self { ... }
fn full(self) -> Self { ... }
}
Required Associated Types§
Required Methods§
fn left(self, value: impl Into<Self::Unit>) -> Self
fn right(self, value: impl Into<Self::Unit>) -> Self
fn top(self, value: impl Into<Self::Unit>) -> Self
fn bottom(self, value: impl Into<Self::Unit>) -> Self
Provided Methods§
fn x(self, value: impl Into<Self::Unit>) -> Self
fn y(self, value: impl Into<Self::Unit>) -> Self
fn horizontal(self, value: impl Into<Self::Unit>) -> Self
fn vertical(self, value: impl Into<Self::Unit>) -> Self
fn all(self, value: impl Into<Self::Unit>) -> Self
fn zero(self) -> Self
fn half(self) -> Self
fn full(self) -> Self
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.