Trait Spacing

Source
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§

Source

fn left(self, value: impl Into<Self::Unit>) -> Self

Source

fn right(self, value: impl Into<Self::Unit>) -> Self

Source

fn top(self, value: impl Into<Self::Unit>) -> Self

Source

fn bottom(self, value: impl Into<Self::Unit>) -> Self

Provided Methods§

Source

fn x(self, value: impl Into<Self::Unit>) -> Self

Source

fn y(self, value: impl Into<Self::Unit>) -> Self

Source

fn horizontal(self, value: impl Into<Self::Unit>) -> Self

Source

fn vertical(self, value: impl Into<Self::Unit>) -> Self

Source

fn all(self, value: impl Into<Self::Unit>) -> Self

Source

fn zero(self) -> Self

Source

fn half(self) -> Self

Source

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.

Implementors§