pub struct DockSize {
pub permille: Option<u16>,
pub full: bool,
}Expand description
The dock height the user chose (dragging the dock’s bottom edge, the
host’s taller / shorter keys, or its fullscreen toggle). Mouser sends it as
dock in the view.resized payload (and again whenever it changes);
a mode lays its dock out with DockSize::height. Older modes ignore it
and keep their own height.
Fields§
§permille: Option<u16>Share of the terminal area in 1/1000 (None: the mode’s default).
full: boolThe dock fills the whole terminal area (the shell is hidden until it is toggled off; the terminal keeps its size).
Implementations§
Source§impl DockSize
impl DockSize
Sourcepub fn height(&self, area: Rect, cell_h: i32, default_h: i32) -> i32
pub fn height(&self, area: Rect, cell_h: i32, default_h: i32) -> i32
The dock height for area: the whole area when full, else the chosen
share, else default_h; at least four rows and leaving two for the shell.
Sourcepub fn from_payload(v: &Value) -> Self
pub fn from_payload(v: &Value) -> Self
From a view.resized payload (dock, absent from older hosts).
Trait Implementations§
impl Copy for DockSize
Source§impl<'de> Deserialize<'de> for DockSize
impl<'de> Deserialize<'de> for DockSize
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
impl Eq for DockSize
impl StructuralPartialEq for DockSize
Auto Trait Implementations§
impl Forget for DockSize
impl Freeze for DockSize
impl RefUnwindSafe for DockSize
impl Send for DockSize
impl Sync for DockSize
impl Unpin for DockSize
impl UnsafeUnpin for DockSize
impl UnwindSafe for DockSize
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