Skip to main content

Module share_sheet

Module share_sheet 

Source
Expand description

System share sheet: hand a file (and optional text) to the OS share UI so the user can send it to another app.

Like crate::uri_handler, the compiled-in default is a no-op that reports ShareError::Unsupported; platform backends install a real implementation through set_platform_share_sheet (iOS UIActivityViewController, Android ACTION_SEND, the Web Share API). Desktop has no system share sheet — apps export through a save dialog instead — so is_supported is false there and the UI can offer “Save…” rather than “Share”.

Structs§

ShareContent
A single file to share, with an optional accompanying message/subject.

Enums§

ShareError

Traits§

ShareSheet
The OS share sheet. Installed by the platform backend; the default is a no-op that reports ShareError::Unsupported.

Functions§

ProvideShareSheet
clear_platform_share_sheet
Removes any registered platform share sheet (tests and teardown).
default_share_sheet
local_share_sheet
set_platform_share_sheet
Installs a platform share sheet, replacing any previously installed one. Backends with main-thread UIKit / Activity access register here.

Type Aliases§

ShareSheetRef