pub struct SimplificationOptions {
    pub prune_empty_tabs: bool,
    pub prune_empty_containers: bool,
    pub prune_single_child_tabs: bool,
    pub prune_single_child_containers: bool,
    pub all_panes_must_have_tabs: bool,
    pub join_nested_linear_containerss: bool,
}
Expand description

What are the rules for simplifying the tree?

Drag-dropping tiles can often leave containers empty, or with only a single child. The SimplificationOptions specifies what simplifications are allowed.

The Tree will run a simplification pass each frame.

Fields§

§prune_empty_tabs: bool

Remove empty Tabs containers?

§prune_empty_containers: bool

Remove empty containers (that aren’t Tabs)?

§prune_single_child_tabs: bool

Remove Tabs containers with only a single child?

Even if true, Self::all_panes_must_have_tabs will be respected.

§prune_single_child_containers: bool

Prune containers (that aren’t Tabs) with only a single child?

§all_panes_must_have_tabs: bool

If true, each pane will have a Tabs container as a parent.

This will win out over Self::prune_single_child_tabs.

§join_nested_linear_containerss: bool

If a horizontal container contain another horizontal container, join them? Same for vertical containers. Does NOT apply to grid container or tab containers.

Trait Implementations§

source§

impl Clone for SimplificationOptions

source§

fn clone(&self) -> SimplificationOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SimplificationOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SimplificationOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Hash for SimplificationOptions

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<SimplificationOptions> for SimplificationOptions

source§

fn eq(&self, other: &SimplificationOptions) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SimplificationOptions

source§

impl Eq for SimplificationOptions

source§

impl StructuralEq for SimplificationOptions

source§

impl StructuralPartialEq for SimplificationOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> SerializableAny for Twhere T: 'static + Any + Clone + Send + Sync,