Skip to main content

LoginManager

Struct LoginManager 

Source
pub struct LoginManager {
    state: LoginState,
    current_input: Vec<u8>,
    setup_password: Vec<u8>,
    saved_password_hash: [u8; 32],
    error_ticks_end: usize,
    error_msg: &'static str,
    pub needs_redraw: bool,
}

Fields§

§state: LoginState§current_input: Vec<u8>§setup_password: Vec<u8>§saved_password_hash: [u8; 32]§error_ticks_end: usize§error_msg: &'static str§needs_redraw: bool

Implementations§

Source§

impl LoginManager

Source

pub fn new() -> Self

Source

fn check_saved_password(&mut self)

SylFS から password.cfg を読み込んで保存されているパスワード情報があるか確認

Source

pub fn is_unlocked(&self) -> bool

Source

pub fn handle_key_input(&mut self, c: char)

キーボード入力イベントの処理

Source

fn process_completed_input(&mut self)

入力完了(Enter押下時)の処理

Source

fn trigger_error(&mut self, msg: &'static str)

Source

pub fn handle_mouse_input( &mut self, _mx: u32, _my: u32, left_btn: bool, _wheel: i32, )

マウス入力はパスワードログインでは基本的に不要ですが、画面クリック時に エラー表示をリセットする用途として最小限残します

Source

pub fn draw(&mut self, screen: &Screen)

プレミアムなセキュリティダイアログの描画

Trait Implementations§

Source§

impl Default for LoginManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.