Skip to main content

StrategyConfig

Enum StrategyConfig 

Source
pub enum StrategyConfig {
    Sequence {
        direction: Direction,
        gap: f32,
    },
    MasterStack {
        master_ratio: f32,
        gap: f32,
    },
    Deck {
        master_ratio: f32,
        gap: f32,
    },
    CenteredMaster {
        master_ratio: f32,
        gap: f32,
    },
    BinarySplit {
        spiral: bool,
        ratio: f32,
        gap: f32,
    },
    ColumnGrid {
        columns: usize,
        gap: f32,
    },
    Dashboard {
        columns: usize,
        gap: f32,
        spans: Vec<usize>,
    },
    ActivePanel {
        variant: ActivePanelVariant,
        bar_height: f32,
    },
    Window {
        size: usize,
        gap: f32,
    },
    Slotted {
        slots: Vec<SnapshotSlotDef>,
        gap: f32,
        direction: Direction,
    },
}
Expand description

Serializable strategy configuration — mirrors StrategyKind with owned collections instead of Arc<[T]>.

Variants§

§

Sequence

Flat sequence of panels in a row or column.

Fields

§direction: Direction

Layout direction.

§gap: f32

Gap between panels.

§

MasterStack

One master panel with a stack of secondaries.

Fields

§master_ratio: f32

Fraction of space for the master panel.

§gap: f32

Gap between panels.

§

Deck

Master panel with a peek at adjacent panels.

Fields

§master_ratio: f32

Fraction of space for the master panel.

§gap: f32

Gap between panels.

§

CenteredMaster

Master panel centered with stacks on both sides.

Fields

§master_ratio: f32

Fraction of space for the master panel.

§gap: f32

Gap between panels.

§

BinarySplit

Recursive binary splits (dwindle or spiral).

Fields

§spiral: bool

Whether to alternate split direction in a spiral.

§ratio: f32

Split ratio between parent and child.

§gap: f32

Gap between panels.

§

ColumnGrid

Fixed number of equal columns with panels distributed.

Fields

§columns: usize

Number of columns.

§gap: f32

Gap between panels.

§

Dashboard

Grid with per-panel column spans.

Fields

§columns: usize

Number of columns.

§gap: f32

Gap between panels.

§spans: Vec<usize>

Column span for each panel.

§

ActivePanel

Only one panel visible at a time (monocle, tabbed, stacked).

Fields

§variant: ActivePanelVariant

Which variant of active-panel display.

§bar_height: f32

Height of the tab/title bar decoration.

§

Window

Sliding window of visible panels.

Fields

§size: usize

How many panels are visible at once.

§gap: f32

Gap between panels.

§

Slotted

Fixed slots with predefined constraints.

Fields

§slots: Vec<SnapshotSlotDef>

Slot definitions (kind + constraints).

§gap: f32

Gap between slots.

§direction: Direction

Layout direction.

Trait Implementations§

Source§

impl Clone for StrategyConfig

Source§

fn clone(&self) -> StrategyConfig

Returns a duplicate 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 StrategyConfig

Source§

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

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

impl From<&StrategyConfig> for StrategyKind

Source§

fn from(sc: &StrategyConfig) -> Self

Converts to this type from the input type.
Source§

impl From<&StrategyKind> for StrategyConfig

Source§

fn from(sk: &StrategyKind) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.