pub trait Sharing: MaybeSend + 'static {
// Provided methods
fn offers(&self, kind: ShareKind) -> ShareOffer { ... }
fn link(&self, kind: ShareKind, name: &str, reply: Reply<ShareLink>) { ... }
fn copy(&self, kind: ShareKind, name: &str, reply: Reply<String>) { ... }
}Expand description
Sharing a layout or watchlist, supplied by a host that has accounts and somewhere to keep shared documents. The library owns neither: it shows the controls the host offers and reports the host’s answers. Without a service the layout menu and the watchlist panel offer no sharing.
Methods are called on the UI thread and return at once; answer through the Reply you were
given, from any thread, runtime or browser task. Answer an error, such as
FeedError::Other with the reason, to reject an operation:
the menu shows it. The documents are the ones the host already holds under name.
Provided Methods§
Sourcefn offers(&self, kind: ShareKind) -> ShareOffer
fn offers(&self, kind: ShareKind) -> ShareOffer
Which operations to offer for kind. The default offers none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".