#[non_exhaustive]pub enum LayoutNode {
Group(EditorGroup),
Split {
direction: SplitDirection,
ratio: f32,
first: Box<LayoutNode>,
second: Box<LayoutNode>,
},
}Available on crate features
state and storage only.Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Group(EditorGroup)
A leaf with an editor group.
Split
Two children side by side or stacked.
Fields
§
direction: SplitDirectionDirection.
§
first: Box<LayoutNode>First child.
§
second: Box<LayoutNode>Second child.
Implementations§
Source§impl LayoutNode
impl LayoutNode
Sourcepub fn group(&self, id: EditorGroupId) -> Option<&EditorGroup>
pub fn group(&self, id: EditorGroupId) -> Option<&EditorGroup>
The group with id, if present.
Sourcepub fn group_mut(&mut self, id: EditorGroupId) -> Option<&mut EditorGroup>
pub fn group_mut(&mut self, id: EditorGroupId) -> Option<&mut EditorGroup>
The group with id, mutably.
Sourcepub fn ids(&self) -> Vec<EditorGroupId>
pub fn ids(&self) -> Vec<EditorGroupId>
The group ids in depth-first order.
Sourcepub fn first_id(&self) -> Option<EditorGroupId>
pub fn first_id(&self) -> Option<EditorGroupId>
The first group id, used when splitting an unknown group.
Trait Implementations§
Source§impl Clone for LayoutNode
impl Clone for LayoutNode
Source§impl Debug for LayoutNode
impl Debug for LayoutNode
Source§impl<'de> Deserialize<'de> for LayoutNode
impl<'de> Deserialize<'de> for LayoutNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LayoutNode
impl PartialEq for LayoutNode
Source§impl Serialize for LayoutNode
impl Serialize for LayoutNode
impl StructuralPartialEq for LayoutNode
Auto Trait Implementations§
impl Forget for LayoutNode
impl Freeze for LayoutNodewhere
*const u8 is !null: Freeze,
PhantomData<LayoutTab>: Freeze,
*const LayoutNode is !null: Freeze,
PhantomData<LayoutNode>: Freeze,
impl Move for LayoutNode
impl RefUnwindSafe for LayoutNode
impl Send for LayoutNode
impl Sync for LayoutNode
impl Unpin for LayoutNode
impl UnsafeUnpin for LayoutNodewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<LayoutTab>: UnsafeUnpin,
*const LayoutNode is !null: UnsafeUnpin,
PhantomData<LayoutNode>: UnsafeUnpin,
impl UnwindSafe for LayoutNode
Blanket Implementations§
impl<T> Allocation for T
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
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<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> ⓘ
Converts
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> ⓘ
Converts
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