pub trait DataTransferItemExtensions: IDataTransferItem {
// Provided methods
fn contains(&self, format: &DataFormat) -> bool { ... }
fn try_get_value<T: Clone + 'static>(
&self,
format: &DataFormatOf<T>,
) -> Option<T> { ... }
fn try_get_text(&self) -> Option<String> { ... }
fn try_get_bitmap(&self) -> Option<Rc<Bitmap>> { ... }
fn try_get_file(&self) -> Option<Rc<dyn IStorageItem>> { ... }
}Expand description
Contains extension methods for IDataTransferItem.
Provided Methods§
Sourcefn contains(&self, format: &DataFormat) -> bool
fn contains(&self, format: &DataFormat) -> bool
Gets whether the item supports a specific format.
Sourcefn try_get_value<T: Clone + 'static>(
&self,
format: &DataFormatOf<T>,
) -> Option<T>
fn try_get_value<T: Clone + 'static>( &self, format: &DataFormatOf<T>, ) -> Option<T>
Tries to get a value for a given format from the item. Returns
None if the format is not supported.
Sourcefn try_get_text(&self) -> Option<String>
fn try_get_text(&self) -> Option<String>
Returns a text, if available, from the item.
Sourcefn try_get_bitmap(&self) -> Option<Rc<Bitmap>>
fn try_get_bitmap(&self) -> Option<Rc<Bitmap>>
Returns a bitmap, if available, from the item.
Sourcefn try_get_file(&self) -> Option<Rc<dyn IStorageItem>>
fn try_get_file(&self) -> Option<Rc<dyn IStorageItem>>
Returns a file (or folder), if available, from the item.
See DataFormat::file.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".