PathPicker

Struct PathPicker 

Source
pub struct PathPicker<'input, 'path, S: TextBuffer, I: IconProvider> { /* private fields */ }
Expand description

A widget for picking files.

It boils down to a text input, next to a button that opens a widget that allows the user to search the local files and directories.

Implementations§

Source§

impl<'input, 'path, S: TextBuffer, I: IconProvider> PathPicker<'input, 'path, S, I>

Source

pub fn new<P: AsRef<Path>>(input: &'input mut S, default_path: &'path P) -> Self

Creates a new PathPicker widget

§Args
  • input: the buffer to use for input storage
  • default_path: the path to fall back onto when the user inputs an invalid path

Trait Implementations§

Source§

impl<S: TextBuffer, I: IconProvider> Widget for PathPicker<'_, '_, S, I>

Source§

fn ui(self, ui: &mut Ui) -> Response

Allocate space, interact, paint, and return a Response. Read more

Auto Trait Implementations§

§

impl<'input, 'path, S, I> Freeze for PathPicker<'input, 'path, S, I>

§

impl<'input, 'path, S, I> RefUnwindSafe for PathPicker<'input, 'path, S, I>

§

impl<'input, 'path, S, I> Send for PathPicker<'input, 'path, S, I>
where S: Send, I: Send,

§

impl<'input, 'path, S, I> Sync for PathPicker<'input, 'path, S, I>
where S: Sync, I: Sync,

§

impl<'input, 'path, S, I> Unpin for PathPicker<'input, 'path, S, I>
where I: Unpin,

§

impl<'input, 'path, S, I> !UnwindSafe for PathPicker<'input, 'path, S, I>

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, 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.