pub struct Share { /* private fields */ }Expand description
Sharing (docs/sharing.md): Share::url(…)…present(), with the app’s own chooser actions.
A link to share through the system’s share chooser, with the app’s own actions beside the
system’s targets: Safari’s Add Bookmark and Find on Page. Build one with
Share::url, then present it from a user action.
ⓘ
Share::url(page.url())
.title(page.title())
.action(share_action(res::str::add_bookmark()).symbol(Symbol::Bookmark).action(add))
.action(share_action(res::str::find_on_page()).symbol(Symbol::Search).action(find))
.anchor(id!(share))
.present();Implementations§
Sourcepub fn title(self, title: impl Into<String>) -> Share
pub fn title(self, title: impl Into<String>) -> Share
The link’s title: a mail’s subject, the chooser’s header where it shows one.
Sourcepub fn action(self, action: ShareAction) -> Share
pub fn action(self, action: ShareAction) -> Share
Offer one of the app’s own actions in the chooser, after the system’s. Where the chooser
cannot carry the app’s actions (Cap::ShareActions is Unsupported), they are left out:
offer the same commands in the app’s own menu as well.
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more