[−][src]Struct vt::Console
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,