pub struct SaveDelegateBuilder { /* private fields */ }
Expand description

A builder-pattern type to construct SaveDelegate objects.

Implementations§

source§

impl SaveDelegateBuilder

source

pub fn icon(self, icon: &impl IsA<Icon>) -> Self

The “icon” property contains a gio::Icon that describes the save operation. Generally, this should be the symbolic icon of the document class you are saving.

Alternatively, you can use icon-name for a named icon.

source

pub fn icon_name(self, icon_name: impl Into<GString>) -> Self

The “icon-name” property contains the name of an icon to use when showing information about the save operation in UI such as a save dialog.

You can also use icon to set a gio::Icon instead of an icon name.

source

pub fn is_draft(self, is_draft: bool) -> Self

The “is-draft” property indicates that the document represented by the delegate is a draft and might be lost of not saved.

source

pub fn progress(self, progress: f64) -> Self

The “progress” property contains progress between 0.0 and 1.0 and should be updated by the delegate implementation as saving progresses.

source

pub fn subtitle(self, subtitle: impl Into<GString>) -> Self

The “subtitle” property contains additional information that may not make sense to put in the title. This might include the directory that the file will be saved within.

source

pub fn title(self, title: impl Into<GString>) -> Self

The “title” property contains the title of the document being saved. Generally, this should be the base name of the document such as file.txt.

source

pub fn build(self) -> SaveDelegate

Build the SaveDelegate.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.