pub struct LayoutConfig {
pub hpad_left: u16,
pub hpad_right: u16,
pub hpad_left_compact: u16,
pub hpad_right_compact: u16,
pub outer_vpad: u16,
pub outer_vpad_compact: u16,
}Expand description
Horizontal + vertical padding configuration for the agent view.
All values are in terminal cells. The eff_* methods fold in the compact
flag so callers pass one boolean instead of replicating the conditional
everywhere.
Fields§
§hpad_left: u16Left horizontal padding (normal mode).
hpad_right: u16Right horizontal padding (normal mode).
hpad_left_compact: u16Left horizontal padding (compact mode).
hpad_right_compact: u16Right horizontal padding (compact mode).
outer_vpad: u16Outer vertical padding (normal mode).
outer_vpad_compact: u16Outer vertical padding (compact mode — usually 0).
Implementations§
Source§impl LayoutConfig
impl LayoutConfig
Sourcepub fn eff_hpad_left(&self, compact: bool) -> u16
pub fn eff_hpad_left(&self, compact: bool) -> u16
Effective left horizontal padding given the compact flag.
Sourcepub fn eff_hpad_right(&self, compact: bool) -> u16
pub fn eff_hpad_right(&self, compact: bool) -> u16
Effective right horizontal padding given the compact flag.
Sourcepub fn eff_outer_vpad(&self, compact: bool) -> u16
pub fn eff_outer_vpad(&self, compact: bool) -> u16
Effective outer vertical padding given the compact flag.
Trait Implementations§
Source§impl Clone for LayoutConfig
impl Clone for LayoutConfig
Source§fn clone(&self) -> LayoutConfig
fn clone(&self) -> LayoutConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LayoutConfig
Source§impl Debug for LayoutConfig
impl Debug for LayoutConfig
Source§impl Default for LayoutConfig
impl Default for LayoutConfig
impl Eq for LayoutConfig
Source§impl PartialEq for LayoutConfig
impl PartialEq for LayoutConfig
impl StructuralPartialEq for LayoutConfig
Auto Trait Implementations§
impl Freeze for LayoutConfig
impl RefUnwindSafe for LayoutConfig
impl Send for LayoutConfig
impl Sync for LayoutConfig
impl Unpin for LayoutConfig
impl UnsafeUnpin for LayoutConfig
impl UnwindSafe for LayoutConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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