pub struct Node {Show 18 fields
pub width: Size,
pub height: Size,
pub minimum_width: Size,
pub minimum_height: Size,
pub maximum_width: Size,
pub maximum_height: Size,
pub main_alignment: Alignment,
pub cross_alignment: Alignment,
pub padding: Gaps,
pub margin: Gaps,
pub offset_x: Length<f32, Measure>,
pub offset_y: Length<f32, Measure>,
pub direction: DirectionMode,
pub position: Position,
pub content: Content,
pub has_layout_references: bool,
pub contains_text: bool,
pub spacing: Length<f32, Measure>,
}
Expand description
Node layout configuration
Fields§
§width: Size
Dimentions
height: Size
§minimum_width: Size
§minimum_height: Size
§maximum_width: Size
§maximum_height: Size
§main_alignment: Alignment
§cross_alignment: Alignment
§padding: Gaps
Inner padding
margin: Gaps
Inner margin
offset_x: Length<f32, Measure>
Inner position offsets
offset_y: Length<f32, Measure>
§direction: DirectionMode
Direction in which it’s inner Nodes will be stacked
position: Position
Position config
content: Content
§has_layout_references: bool
A Node might depend on inner sizes but have a fixed position, like scroll views.
contains_text: bool
§spacing: Length<f32, Measure>
Implementations§
§impl Node
impl Node
pub fn from_size_and_direction(
width: Size,
height: Size,
direction: DirectionMode,
) -> Node
pub fn from_size_and_direction( width: Size, height: Size, direction: DirectionMode, ) -> Node
Construct a new Node given a size and a direction
pub fn from_size_and_scroll(
width: Size,
height: Size,
offset_x: Length<f32, Measure>,
offset_y: Length<f32, Measure>,
) -> Node
pub fn from_size_and_scroll( width: Size, height: Size, offset_x: Length<f32, Measure>, offset_y: Length<f32, Measure>, ) -> Node
Construct a new Node given a size and a scroll
pub fn from_size_and_padding(width: Size, height: Size, padding: Gaps) -> Node
pub fn from_size_and_padding(width: Size, height: Size, padding: Gaps) -> Node
Construct a new Node given a size and padding
pub fn from_size_and_alignments_and_direction(
width: Size,
height: Size,
main_alignment: Alignment,
cross_alignment: Alignment,
direction: DirectionMode,
) -> Node
pub fn from_size_and_alignments_and_direction( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: DirectionMode, ) -> Node
Construct a new Node given a size, alignments and a direction
pub fn from_size_and_alignments_and_direction_and_spacing(
width: Size,
height: Size,
main_alignment: Alignment,
cross_alignment: Alignment,
direction: DirectionMode,
spacing: Length<f32, Measure>,
) -> Node
pub fn from_size_and_alignments_and_direction_and_spacing( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: DirectionMode, spacing: Length<f32, Measure>, ) -> Node
Construct a new Node given a size, alignments, direction and spacing
pub fn from_size_and_margin(width: Size, height: Size, margin: Gaps) -> Node
pub fn from_size_and_margin(width: Size, height: Size, margin: Gaps) -> Node
Construct a new Node given a size and a direction
pub fn from_size_and_direction_and_margin(
width: Size,
height: Size,
direction: DirectionMode,
margin: Gaps,
) -> Node
pub fn from_size_and_direction_and_margin( width: Size, height: Size, direction: DirectionMode, margin: Gaps, ) -> Node
Construct a new Node given a size and a direction and some margin,
pub fn from_size_and_alignments_and_direction_and_padding(
width: Size,
height: Size,
main_alignment: Alignment,
cross_alignment: Alignment,
direction: DirectionMode,
padding: Gaps,
) -> Node
pub fn from_size_and_alignments_and_direction_and_padding( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: DirectionMode, padding: Gaps, ) -> Node
Construct a new Node given a size, alignments and a direction
pub fn from_size_and_position(
width: Size,
height: Size,
position: Position,
) -> Node
pub fn from_size_and_position( width: Size, height: Size, position: Position, ) -> Node
Construct a new Node given a size and a position
pub fn from_size_and_content(
width: Size,
height: Size,
content: Content,
) -> Node
pub fn from_size_and_content( width: Size, height: Size, content: Content, ) -> Node
Construct a new Node given a size and content
pub fn from_size_and_direction_and_spacing(
width: Size,
height: Size,
direction: DirectionMode,
spacing: Length<f32, Measure>,
) -> Node
pub fn from_size_and_direction_and_spacing( width: Size, height: Size, direction: DirectionMode, spacing: Length<f32, Measure>, ) -> Node
Construct a new Node given a size and spacing
pub fn does_depend_on_inner(&self) -> bool
pub fn does_depend_on_inner(&self) -> bool
Has properties that depend on the inner Nodes?
pub fn do_inner_depend_on_parent(&self) -> bool
pub fn do_inner_depend_on_parent(&self) -> bool
Has properties that make its children dependant on it?
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.