pub struct Surface {
pub size: SurfaceSize,
pub cell_pixels: Option<CellPixels>,
}Expand description
What an application can observe about the surface it draws on.
An application needs these facts only where they carry application meaning —
a viewport measured in cells, a layout that changes with the width. They
reach update as a message and are read from the model by view, which
receives no surface input of its own.
What the terminal can do with graphics is not here. Protocol capabilities select a runtime presentation strategy; they are not application state.
Fields§
§size: SurfaceSizeThe drawable area, in cells.
cell_pixels: Option<CellPixels>How large one cell is in pixels, where the terminal reports it.
Implementations§
Trait Implementations§
impl Copy for Surface
impl Eq for Surface
impl StructuralPartialEq for Surface
Auto Trait Implementations§
impl Freeze for Surface
impl RefUnwindSafe for Surface
impl Send for Surface
impl Sync for Surface
impl Unpin for Surface
impl UnsafeUnpin for Surface
impl UnwindSafe for Surface
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