Struct ashpd::desktop::file_chooser::Choice
source · pub struct Choice(/* private fields */);
Expand description
Presents the user with a choice to select from or as a checkbox.
Implementations§
source§impl Choice
impl Choice
sourcepub fn boolean(id: &str, label: &str, state: bool) -> Self
pub fn boolean(id: &str, label: &str, state: bool) -> Self
Creates a checkbox choice.
§Arguments
id
- A unique identifier of the choice.label
- user-visible name of the choice.state
- the initial state value.
sourcepub fn new(id: &str, label: &str, initial_selection: &str) -> Self
pub fn new(id: &str, label: &str, initial_selection: &str) -> Self
Creates a new choice.
§Arguments
id
- A unique identifier of the choice.label
- user-visible name of the choice.initial_selection
- the initially selected value.
sourcepub fn initial_selection(&self) -> &str
pub fn initial_selection(&self) -> &str
The initially selected value.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Choice
impl<'de> Deserialize<'de> for Choice
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Choice
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnwindSafe for Choice
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<'de, T> DynamicDeserialize<'de> for T
impl<'de, T> DynamicDeserialize<'de> for T
§type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
source§fn deserializer_for_signature<S>(
signature: S,
) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
fn deserializer_for_signature<S>( signature: S, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
Get a deserializer compatible with this signature.
source§impl<T> DynamicType for T
impl<T> DynamicType for T
source§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more