#[repr(C)]pub struct Edges<T> {
pub top: T,
pub right: T,
pub bottom: T,
pub left: T,
}Expand description
A value for each edge of a box: insets, paddings, borders.
Fields§
§top: TThe top edge.
right: TThe right edge.
bottom: TThe bottom edge.
left: TThe left edge.
Implementations§
Source§impl Edges<DefiniteLength>
impl Edges<DefiniteLength>
Sourcepub fn zero() -> Edges<DefiniteLength>
pub fn zero() -> Edges<DefiniteLength>
Zero on every edge.
Sourcepub fn to_points(
self,
parent_size: Size<AbsoluteLength>,
rem_size: Points,
) -> Edges<Points>
pub fn to_points( self, parent_size: Size<AbsoluteLength>, rem_size: Points, ) -> Edges<Points>
In points: fractions of parent_size along each edge’s axis (the
height for the top and bottom edges, as GPUI resolves them; CSS
resolves a padding’s percentages against the width on every edge,
which a parent_size of the width twice gives), rems of
rem_size.
Source§impl Edges<AbsoluteLength>
impl Edges<AbsoluteLength>
Trait Implementations§
impl<T> Copy for Edges<T>where
T: Copy,
Source§impl<'de, T> Deserialize<'de> for Edges<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Edges<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Edges<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Edges<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> Eq for Edges<T>where
T: Eq,
Source§impl JsValue for Edges<Points>
A length on each side, in points, as a host element’s hitSlop takes
it (TS number | Partial<Edges>): one number for every side, or the
sides named, each left out 0. A Rust component’s prop of the host
prop’s meaning (Button’s hitSlop) takes the same values. To JS it
is the four sides.
impl JsValue for Edges<Points>
A length on each side, in points, as a host element’s hitSlop takes
it (TS number | Partial<Edges>): one number for every side, or the
sides named, each left out 0. A Rust component’s prop of the host
prop’s meaning (Button’s hitSlop) takes the same values. To JS it
is the four sides.
Source§impl<T> Serialize for Edges<T>where
T: Serialize,
impl<T> Serialize for Edges<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> StructuralPartialEq for Edges<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Freeze for Edges<T>where
T: Freeze,
impl<T> RefUnwindSafe for Edges<T>where
T: RefUnwindSafe,
impl<T> Send for Edges<T>where
T: Send,
impl<T> Sync for Edges<T>where
T: Sync,
impl<T> Unpin for Edges<T>where
T: Unpin,
impl<T> UnsafeUnpin for Edges<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Edges<T>where
T: UnwindSafe,
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
Source§impl<T> CallbackArgs for Twhere
T: Ret,
impl<T> CallbackArgs for Twhere
T: Ret,
Source§fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
Its TypeScript parameters, named
names (name: string, amount: number), or without names value for one and a, b, … for
several.Source§fn into_js_args<'a>(
self,
host: &'a dyn JsHost,
) -> Result<Vec<JsOwned<'a>>, PropError>
fn into_js_args<'a>( self, host: &'a dyn JsHost, ) -> Result<Vec<JsOwned<'a>>, PropError>
The arguments as JS values.
fn classes(out: &mut Vec<&'static ClassDef>)
Source§impl<T> CallbackRet for Twhere
T: JsValue,
impl<T> CallbackRet for Twhere
T: JsValue,
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.