pub struct ContentInsertionConfiguration {
pub on_content_inserted: Rc<dyn Fn(&mut App, KeyboardInsertedContent)>,
pub allowed_mime_types: Vec<String>,
}Expand description
Configures the ability to insert media content through the soft keyboard.
The configuration provides a handler for any rich content inserted through the system input method, and also provides the ability to limit the mime types of the inserted content.
Fields§
§on_content_inserted: Rc<dyn Fn(&mut App, KeyboardInsertedContent)>Called when a user inserts content through the virtual / on-screen keyboard, currently only used on Android.
allowed_mime_types: Vec<String>Used when a user inserts image-based content through the device keyboard, currently only used on Android.
Implementations§
Source§impl ContentInsertionConfiguration
impl ContentInsertionConfiguration
Sourcepub fn new(
on_content_inserted: impl Fn(&mut App, KeyboardInsertedContent) + 'static,
) -> ContentInsertionConfiguration
pub fn new( on_content_inserted: impl Fn(&mut App, KeyboardInsertedContent) + 'static, ) -> ContentInsertionConfiguration
Creates a content insertion configuration with the specified options.
A handler for inserted content, in the form of on_content_inserted,
must be supplied.
Sourcepub fn allowed_mime_types(self, allowed_mime_types: Vec<String>) -> Self
pub fn allowed_mime_types(self, allowed_mime_types: Vec<String>) -> Self
Dart ContentInsertionConfiguration(allowedMimeTypes:).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ContentInsertionConfiguration
impl !Send for ContentInsertionConfiguration
impl !Sync for ContentInsertionConfiguration
impl !UnwindSafe for ContentInsertionConfiguration
impl Forget for ContentInsertionConfiguration
impl Freeze for ContentInsertionConfigurationwhere
*const RcInner<dyn Fn(&mut App, KeyboardInsertedContent)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, KeyboardInsertedContent)>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
impl Move for ContentInsertionConfiguration
impl Unpin for ContentInsertionConfiguration
impl UnsafeUnpin for ContentInsertionConfigurationwhere
*const RcInner<dyn Fn(&mut App, KeyboardInsertedContent)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, KeyboardInsertedContent)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
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