Struct ambient_layout::Borders
source · pub struct Borders {
pub top: f32,
pub bottom: f32,
pub left: f32,
pub right: f32,
}
Fields§
§top: f32
§bottom: f32
§left: f32
§right: f32
Implementations§
source§impl Borders
impl Borders
pub const ZERO: Borders = _
pub fn top(top: f32) -> Self
pub fn bottom(bottom: f32) -> Self
pub fn left(left: f32) -> Self
pub fn right(right: f32) -> Self
pub fn horizontal(left_right: f32) -> Self
pub fn vertical(top_bottom: f32) -> Self
pub fn even(value: f32) -> Self
pub fn rect(top_bottom: f32, left_right: f32) -> Self
pub fn component_by_index(&self, index: usize) -> f32
pub fn get_horizontal(&self) -> f32
pub fn get_vertical(&self) -> f32
pub fn set_top(self, top: f32) -> Self
pub fn set_bottom(self, bottom: f32) -> Self
pub fn set_left(self, left: f32) -> Self
pub fn set_right(self, right: f32) -> Self
pub fn offset(&self) -> Vec2
pub fn border_size(&self) -> Vec2
Trait Implementations§
impl Copy for Borders
Auto Trait Implementations§
impl RefUnwindSafe for Borders
impl Send for Borders
impl Sync for Borders
impl Unpin for Borders
impl UnwindSafe for Borders
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> ComponentValueBase for Twhere
T: Send + Sync + 'static,
impl<T> ComponentValueBase for Twhere T: Send + Sync + 'static,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.