FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IDataTransferItem

    trait · ferroui-base · v0.5.0

    trait IDataTransferItem
    

    Represent an item inside a IDataTransfer. An item may support several formats and can return the value of a given format on demand.

    See DataTransferItem for the mutable implementation.

    View source

    Members

    formats

    fn formats(self: &Self) -> Rc<[DataFormat]>
    

    Gets the formats supported by this item.

    Source

    try_get_raw

    fn try_get_raw(self: &Self, format: &DataFormat) -> Option<Rc<dyn Any>>
    

    Tries to get a value for a given format. Returns None if the format is not supported.

    Implementations of this method are expected to return a value matching the exact data type of the underlying DataFormatOf.

    To retrieve a typed value, use DataTransferItemExtensions::try_get_value.

    Source

    Trait implementations

    Availability

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