pub struct Screen {
pub rows: usize,
pub columns: usize,
pub cursor: usize,
pub alarm: bool,
pub keyboard_locked: bool,
/* private fields */
}Fields§
§rows: usize§columns: usize§cursor: usize§alarm: bool§keyboard_locked: boolImplementations§
Source§impl Screen
impl Screen
pub fn new(rows: usize, columns: usize) -> Self
pub fn size(&self) -> usize
Sourcepub fn position(&self, address: usize) -> (usize, usize)
pub fn position(&self, address: usize) -> (usize, usize)
Row and column (both from 1) of a buffer address.
pub fn address(&self, row: usize, column: usize) -> usize
Sourcepub fn fields(&self) -> Vec<FieldView>
pub fn fields(&self) -> Vec<FieldView>
Every field, in buffer order; empty when the screen is unformatted.
Sourcepub fn field_at(&self, address: usize) -> Option<FieldView>
pub fn field_at(&self, address: usize) -> Option<FieldView>
The field a buffer address falls in.
pub fn field_data(&self, field: &FieldView) -> Vec<u8> ⓘ
Sourcepub fn apply(&mut self, stream: &[u8]) -> Result<(), String>
pub fn apply(&mut self, stream: &[u8]) -> Result<(), String>
Applies an outbound data stream: a command, its WCC, then orders and data.
Sourcepub fn type_at(&mut self, address: usize, text: &[u8]) -> Result<(), String>
pub fn type_at(&mut self, address: usize, text: &[u8]) -> Result<(), String>
The operator typing text (EBCDIC) at an address: it must be in an unprotected field, and
it sets the field’s modified bit. Typing stops at the end of the field.
Sourcepub fn erase_eof(&mut self, address: usize) -> Result<(), String>
pub fn erase_eof(&mut self, address: usize) -> Result<(), String>
ERASE EOF: clears the rest of the field at an address and sets its modified bit.
Trait Implementations§
impl Eq for Screen
impl StructuralPartialEq for Screen
Auto Trait Implementations§
impl Freeze for Screen
impl RefUnwindSafe for Screen
impl Send for Screen
impl Sync for Screen
impl Unpin for Screen
impl UnsafeUnpin for Screen
impl UnwindSafe for Screen
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