pub struct SetMargin {
pub top: PercentLength,
pub right: PercentLength,
pub bottom: PercentLength,
pub left: PercentLength,
}Expand description
Set overlay surface margin relative to the overlay surface’s size.
Fields§
§top: PercentLengthMargin of top side as percent or absolute length relative to the overlay surface’s height.
right: PercentLengthMargin of right side as percent or absolute length relative to the overlay surface’s width.
bottom: PercentLengthMargin of bottom side as percent or absolute length relative to the overlay surface’s height.
left: PercentLengthMargin of left side as percent or absolute length relative to the overlay surface’s width.
Implementations§
Source§impl SetMargin
impl SetMargin
Sourcepub const fn xy(x: PercentLength, y: PercentLength) -> Self
pub const fn xy(x: PercentLength, y: PercentLength) -> Self
Utility function to set same margin for axis.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for SetMargin
impl<'__de, __Context> BorrowDecode<'__de, __Context> for SetMargin
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl From<SetMargin> for WindowRequest
impl From<SetMargin> for WindowRequest
impl StructuralPartialEq for SetMargin
impl WindowRequestItem for SetMargin
Auto Trait Implementations§
impl Freeze for SetMargin
impl RefUnwindSafe for SetMargin
impl Send for SetMargin
impl Sync for SetMargin
impl Unpin for SetMargin
impl UnsafeUnpin for SetMargin
impl UnwindSafe for SetMargin
Blanket Implementations§
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
Mutably borrows from an owned value. Read more