pub struct Border {
pub width: Dimension<f32>,
pub style: BorderStyle,
pub color: Color,
}Expand description
Controls the appearance of a border shown around the dimensions of a view.
Fields§
§width: Dimension<f32>Controls the thickness of a border rendered around a view. If the dimension resolves to either undefined or auto, no border will be shown. If the dimension is a percentage, it will be resolved relative to the width of the view’s bounding box. Note: even if this is a vertical border, it will still be resolved relative to the width.
style: BorderStyleThis is the style that is used to draw the border.
color: ColorThis is the color that is used to draw the border. If the color is translucent (i.e. the alpha channel is not 1.0), the border color will be composited over the background color of the view (if present) using gamma-correct color blending. If the view itself is translucent or transparent, the platform’s own display compositor might use non-gamma-correct color blending when compositing this view on top of any underlying views.
Trait Implementations§
impl Copy for Border
impl StructuralPartialEq for Border
Auto Trait Implementations§
impl Freeze for Border
impl RefUnwindSafe for Border
impl Send for Border
impl Sync for Border
impl Unpin for Border
impl UnwindSafe for Border
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains the unclamped color. Read more