FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PlatformAsyncDataTransfer

    struct · ferroui-base · v0.5.0

    struct PlatformAsyncDataTransfer
    

    The base of the asynchronous data transfers of the platform backends: caches the formats and the items.

    View source

    Members

    new

    fn new(platform_impl: impl PlatformAsyncDataTransferImpl + 'static) -> Rc<PlatformAsyncDataTransfer>
    

    Creates the data transfer for a backend implementation.

    Source

    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.

    Source

    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.

    Source

    are_formats_initialized

    fn are_formats_initialized(self: &Self) -> bool
    

    Whether the formats have been provided by the backend.

    Source

    items

    fn items(self: &Self) -> Rc<[Rc<dyn IAsyncDataTransferItem>]>
    

    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.

    Source

    try_items

    fn try_items(self: &Self) -> Result<Rc<[Rc<dyn IAsyncDataTransferItem>]>, ClipboardError>
    

    Gets the items of the data transfer, or the failure of the backend providing them.

    Source

    are_items_initialized

    fn are_items_initialized(self: &Self) -> bool
    

    Whether the items have been provided by the backend.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.