pub struct OutboundDragData {
pub mime: HashMap<String, Vec<u8>>,
pub files: Vec<PathBuf>,
pub text: Option<String>,
pub uris: Vec<String>,
}Expand description
Flattened, OS-exportable view of a DragPayload, handed to the platform
backend when an in-app drag escalates to an OS drag at the window boundary.
Plain data with no GUI dependency so crate::window::WindowOps can name
it without teksilo-core depending on teksilo-platform.
Fields§
§mime: HashMap<String, Vec<u8>>MIME-typed byte representations to advertise to the OS.
files: Vec<PathBuf>Filesystem paths, if the payload represents files.
text: Option<String>Plain text, if any.
uris: Vec<String>Non-file URLs, if any.
Implementations§
Source§impl OutboundDragData
impl OutboundDragData
Sourcepub fn to_uri_list(&self) -> String
pub fn to_uri_list(&self) -> String
Render Self::files and Self::uris as a text/uri-list payload
(RFC 2483) — the inverse of ExternalDropData::from_uri_list.
Paths are percent-encoded, which is not cosmetic: an un-encoded #
starts a comment line, an un-encoded CR/LF splits one path into two,
and a filename that genuinely contains %20 would come back as a
space. Lines are CRLF-terminated including the last, as the RFC
specifies and as GTK and Qt both expect.
Trait Implementations§
Source§impl Clone for OutboundDragData
impl Clone for OutboundDragData
Source§fn clone(&self) -> OutboundDragData
fn clone(&self) -> OutboundDragData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more