[][src]Struct vt::Console

pub struct Console { /* fields omitted */ }

Handle to a console device file, usually located at /dev/console. This structure allows managing virtual terminals.

Methods

impl Console[src]

pub fn open() -> Result<Console, Error>[src]

Opens a new handle to the console device file.

pub fn current_vt(&self) -> Result<Vt>[src]

Returns the currently active virtual terminal.

pub fn new_vt(&self) -> Result<Vt>[src]

Allocates a new virtual terminal. To switch to the newly created terminal, use Vt::switch or Console::switch_to.

pub fn new_vt_with_minimum_number(&self, min: u16) -> Result<Vt>[src]

Allocates a new virtual terminal with a number greater than or equal to the given number. Be careful not to exaggerate too much with the minimum threshold: usually systems have a maximum number of 16 or 64 vts.

To switch to the newly created terminal, use Vt::switch or Console::switch_to.

pub fn switch_to(&self, vt_number: u16) -> Result<()>[src]

Switches to the virtual terminal with the given number.

pub fn lock_switch(&self, lock: bool) -> Result<()>[src]

Enables or disables virtual terminal switching (usually done with Ctrl + Alt + F<n>).

pub fn blank_timer(&self) -> Result<u32>[src]

Returns the current console blank timer value. A value of 0 means that the timer is disabled. To change the blank timer, use the Vt::set_blank_timer method.

Auto Trait Implementations

impl Sync for Console

impl Send for Console

impl Unpin for Console

impl UnwindSafe for Console

impl RefUnwindSafe for Console

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]