Skip to main content

App

Struct App 

Source
pub struct App {
Show 15 fields pub networks: Vec<WifiNetwork>, pub selected_index: usize, pub state: AppState, pub password_input: String, pub selected_network: Option<WifiNetwork>, pub status_message: String, pub should_quit: bool, pub connection_success: bool, pub connection_error: Option<String>, pub is_disconnect_operation: bool, pub adapter_name: Option<String>, pub network_count: usize, pub last_scan_time: Option<Instant>, pub connection_start_time: Option<Instant>, pub password_visible: bool,
}

Fields§

§networks: Vec<WifiNetwork>§selected_index: usize§state: AppState§password_input: String§selected_network: Option<WifiNetwork>§status_message: String§should_quit: bool§connection_success: bool§connection_error: Option<String>§is_disconnect_operation: bool§adapter_name: Option<String>§network_count: usize§last_scan_time: Option<Instant>§connection_start_time: Option<Instant>§password_visible: bool

Implementations§

Source§

impl App

Source

pub fn new() -> App

Source

pub fn next(&mut self)

Source

pub fn previous(&mut self)

Source

pub fn selected_network_in_list(&self) -> Option<&WifiNetwork>

Source

pub fn begin_operation( &mut self, network: WifiNetwork, operation: OperationKind, )

Source

pub fn activate_selected_network(&mut self)

Source

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

Source

pub fn remove_char_from_password(&mut self)

Source

pub fn confirm_password(&mut self)

Source

pub fn quit(&mut self)

Source

pub fn finish_operation(&mut self, succeeded: bool, error: Option<String>)

Source

pub fn back_to_network_list(&mut self)

Source

pub fn start_scan(&mut self)

Source

pub fn handle_scan_error(&mut self, error: impl Display)

Source

pub fn update_selection_after_rescan(&mut self)

Trait Implementations§

Source§

impl Default for App

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Freeze for App

§

impl RefUnwindSafe for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

§

impl UnwindSafe for App

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.