pub trait MountOperationExt: 'static {
Show 32 methods // Required methods fn is_anonymous(&self) -> bool; fn choice(&self) -> i32; fn domain(&self) -> Option<GString>; fn is_tcrypt_hidden_volume(&self) -> bool; fn is_tcrypt_system_volume(&self) -> bool; fn password(&self) -> Option<GString>; fn password_save(&self) -> PasswordSave; fn pim(&self) -> u32; fn username(&self) -> Option<GString>; fn reply(&self, result: MountOperationResult); fn set_anonymous(&self, anonymous: bool); fn set_choice(&self, choice: i32); fn set_domain(&self, domain: Option<&str>); fn set_is_tcrypt_hidden_volume(&self, hidden_volume: bool); fn set_is_tcrypt_system_volume(&self, system_volume: bool); fn set_password(&self, password: Option<&str>); fn set_password_save(&self, save: PasswordSave); fn set_pim(&self, pim: u32); fn set_username(&self, username: Option<&str>); fn connect_aborted<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_ask_password<F: Fn(&Self, &str, &str, &str, AskPasswordFlags) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_reply<F: Fn(&Self, MountOperationResult) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_show_unmount_progress<F: Fn(&Self, &str, i64, i64) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_anonymous_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_choice_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_domain_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_is_tcrypt_hidden_volume_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_is_tcrypt_system_volume_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_password_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_password_save_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_pim_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_username_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId;
}
Expand description

Trait containing all MountOperation methods.

Implementors

MountOperation

Required Methods§

source

fn is_anonymous(&self) -> bool

Check to see whether the mount operation is being used for an anonymous user.

Returns

true if mount operation is anonymous.

source

fn choice(&self) -> i32

Gets a choice from the mount operation.

Returns

an integer containing an index of the user’s choice from the choice’s list, or 0.

source

fn domain(&self) -> Option<GString>

Gets the domain of the mount operation.

Returns

a string set to the domain.

source

fn is_tcrypt_hidden_volume(&self) -> bool

Available on crate feature v2_58 only.

Check to see whether the mount operation is being used for a TCRYPT hidden volume.

Returns

true if mount operation is for hidden volume.

source

fn is_tcrypt_system_volume(&self) -> bool

Available on crate feature v2_58 only.

Check to see whether the mount operation is being used for a TCRYPT system volume.

Returns

true if mount operation is for system volume.

source

fn password(&self) -> Option<GString>

Gets a password from the mount operation.

Returns

a string containing the password within self.

source

fn password_save(&self) -> PasswordSave

Gets the state of saving passwords for the mount operation.

Returns

a PasswordSave flag.

source

fn pim(&self) -> u32

Available on crate feature v2_58 only.

Gets a PIM from the mount operation.

Returns

The VeraCrypt PIM within self.

source

fn username(&self) -> Option<GString>

Get the user name from the mount operation.

Returns

a string containing the user name.

source

fn reply(&self, result: MountOperationResult)

Emits the signal::MountOperation::reply signal.

result

a MountOperationResult

source

fn set_anonymous(&self, anonymous: bool)

Sets the mount operation to use an anonymous user if anonymous is true.

anonymous

boolean value.

source

fn set_choice(&self, choice: i32)

Sets a default choice for the mount operation.

choice

an integer.

source

fn set_domain(&self, domain: Option<&str>)

Sets the mount operation’s domain.

domain

the domain to set.

source

fn set_is_tcrypt_hidden_volume(&self, hidden_volume: bool)

Available on crate feature v2_58 only.

Sets the mount operation to use a hidden volume if hidden_volume is true.

hidden_volume

boolean value.

source

fn set_is_tcrypt_system_volume(&self, system_volume: bool)

Available on crate feature v2_58 only.

Sets the mount operation to use a system volume if system_volume is true.

system_volume

boolean value.

source

fn set_password(&self, password: Option<&str>)

Sets the mount operation’s password to password.

password

password to set.

source

fn set_password_save(&self, save: PasswordSave)

Sets the state of saving passwords for the mount operation.

save

a set of PasswordSave flags.

source

fn set_pim(&self, pim: u32)

Available on crate feature v2_58 only.

Sets the mount operation’s PIM to pim.

pim

an unsigned integer.

source

fn set_username(&self, username: Option<&str>)

Sets the user name within self to username.

username

input username.

source

fn connect_aborted<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.

Implementations of GMountOperation should handle this signal by dismissing open password dialogs.

source

fn connect_ask_password<F: Fn(&Self, &str, &str, &str, AskPasswordFlags) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted when a mount operation asks the user for a password.

If the message contains a line break, the first line should be presented as a heading. For example, it may be used as the primary text in a GtkMessageDialog.

message

string containing a message to display to the user.

default_user

string containing the default user name.

default_domain

string containing the default domain.

flags

a set of AskPasswordFlags.

source

fn connect_reply<F: Fn(&Self, MountOperationResult) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted when the user has replied to the mount operation.

result

a MountOperationResult indicating how the request was handled

source

fn connect_show_unmount_progress<F: Fn(&Self, &str, i64, i64) + 'static>( &self, f: F ) -> SignalHandlerId

Emitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).

When unmounting or ejecting a volume, the kernel might need to flush pending data in its buffers to the volume stable storage, and this operation can take a considerable amount of time. This signal may be emitted several times as long as the unmount operation is outstanding, and then one last time when the operation is completed, with bytes_left set to zero.

Implementations of GMountOperation should handle this signal by showing an UI notification, and then dismiss it, or show another notification of completion, when bytes_left reaches zero.

If the message contains a line break, the first line should be presented as a heading. For example, it may be used as the primary text in a GtkMessageDialog.

message

string containing a message to display to the user

time_left

the estimated time left before the operation completes, in microseconds, or -1

bytes_left

the amount of bytes to be written before the operation completes (or -1 if such amount is not known), or zero if the operation is completed

source

fn connect_anonymous_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_choice_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_domain_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_is_tcrypt_hidden_volume_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

Available on crate feature v2_58 only.
source

fn connect_is_tcrypt_system_volume_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

Available on crate feature v2_58 only.
source

fn connect_password_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_password_save_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_pim_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Available on crate feature v2_58 only.
source

fn connect_username_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

Implementors§