pub trait Align {
// Required methods
fn align_to<H, V>(
self,
reference: &impl View,
horizontal: H,
vertical: V,
) -> Self
where H: HorizontalAlignment,
V: VerticalAlignment;
fn align_to_mut<H, V>(
&mut self,
reference: &impl View,
horizontal: H,
vertical: V,
) -> &mut Self
where H: HorizontalAlignment,
V: VerticalAlignment;
}
Expand description
This trait enables alignment operations for View
objects
This trait is blanket-implemented for all objects that implement View
.
For more information, see the module level documentation
Required Methods§
Sourcefn align_to<H, V>(
self,
reference: &impl View,
horizontal: H,
vertical: V,
) -> Selfwhere
H: HorizontalAlignment,
V: VerticalAlignment,
fn align_to<H, V>(
self,
reference: &impl View,
horizontal: H,
vertical: V,
) -> Selfwhere
H: HorizontalAlignment,
V: VerticalAlignment,
Return the object aligned to an other one using the alignment parameters as rules
Sourcefn align_to_mut<H, V>(
&mut self,
reference: &impl View,
horizontal: H,
vertical: V,
) -> &mut Selfwhere
H: HorizontalAlignment,
V: VerticalAlignment,
fn align_to_mut<H, V>(
&mut self,
reference: &impl View,
horizontal: H,
vertical: V,
) -> &mut Selfwhere
H: HorizontalAlignment,
V: VerticalAlignment,
Align the object to an other one using the alignment parameters as rules
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.