#[repr(C)]pub struct Winsize {
pub ws_row: u16,
pub ws_col: u16,
pub ws_xpixel: u16,
pub ws_ypixel: u16,
}Expand description
Taille d’une fenêtre de terminal — image ABI de struct winsize
(<asm-generic/termios.h>).
#[repr(C)], disposition identique x86_64/aarch64 (asm-generic). À
échanger avec le kernel par les ioctls TIOCGWINSZ/TIOCSWINSZ de
air-sys-syscall::terminal. Le kernel signale les changements de taille par
SIGWINCH. Les champs sont exposés bruts (pub) — comme Termios — pour
l’échange direct avec le kernel ; des accesseurs const nommés existent pour la
lecture ergonomique.
Fields§
§ws_row: u16ws_row — nombre de lignes (rangées de caractères).
ws_col: u16ws_col — nombre de colonnes (caractères par ligne).
ws_xpixel: u16ws_xpixel — largeur en pixels (souvent 0 : nombre de terminaux ne le
renseignent pas).
ws_ypixel: u16ws_ypixel — hauteur en pixels (souvent 0, comme ws_xpixel).
Implementations§
Trait Implementations§
impl Copy for Winsize
impl Eq for Winsize
impl StructuralPartialEq for Winsize
Auto Trait Implementations§
impl Freeze for Winsize
impl RefUnwindSafe for Winsize
impl Send for Winsize
impl Sync for Winsize
impl Unpin for Winsize
impl UnsafeUnpin for Winsize
impl UnwindSafe for Winsize
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