PlatformDataTransfer
struct · ferroui-base · v0.5.0
struct PlatformDataTransfer
The base of the synchronous data transfers of the platform backends: caches the formats and the items.
Members
new
fn new(platform_impl: impl PlatformDataTransferImpl + 'static) -> Rc<PlatformDataTransfer>
Creates the data transfer for a backend implementation.
formats
fn formats(self: &Self) -> Rc<[DataFormat]>
Gets the formats supported by the data transfer.
Panics
Panics if the backend fails to provide them (where the reference
throws from the property); try_formats reports the
failure instead.
try_formats
fn try_formats(self: &Self) -> Result<Rc<[DataFormat]>, ClipboardError>
Gets the formats supported by the data transfer, or the failure of the backend providing them.
are_formats_initialized
fn are_formats_initialized(self: &Self) -> bool
Whether the formats have been provided by the backend.
items
fn items(self: &Self) -> Rc<[Rc<PlatformDataTransferItem>]>
Gets the items of the data transfer.
Panics
Panics if the backend fails to provide them (where the reference
throws from the property); try_items reports the
failure instead.
try_items
fn try_items(self: &Self) -> Result<Rc<[Rc<PlatformDataTransferItem>]>, ClipboardError>
Gets the items of the data transfer, or the failure of the backend providing them.
are_items_initialized
fn are_items_initialized(self: &Self) -> bool
Whether the items have been provided by the backend.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAsyncDataTransferExtensionsDataTransferExtensionsClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherIDisposableIDataTransferIAsyncDataTransfer
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.