pub trait ContentProviderImpl: ContentProviderImplExt + ObjectImpl {
// Provided methods
fn content_changed(&self) { ... }
fn attach_clipboard(&self, clipboard: &Clipboard) { ... }
fn detach_clipboard(&self, clipboard: &Clipboard) { ... }
fn formats(&self) -> ContentFormats { ... }
fn storable_formats(&self) -> ContentFormats { ... }
fn write_mime_type_future(
&self,
mime_type: &str,
stream: &OutputStream,
io_priority: Priority,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>> { ... }
fn value(&self, type_: Type) -> Result<Value, Error> { ... }
}
Provided Methods§
Sourcefn content_changed(&self)
fn content_changed(&self)
Emits the ::content-changed signal.
fn attach_clipboard(&self, clipboard: &Clipboard)
fn detach_clipboard(&self, clipboard: &Clipboard)
Sourcefn formats(&self) -> ContentFormats
fn formats(&self) -> ContentFormats
Gets the formats that the provider can provide its current contents in.
§Returns
The formats of the provider
Sourcefn storable_formats(&self) -> ContentFormats
fn storable_formats(&self) -> ContentFormats
Gets the formats that the provider suggests other applications to store the data in.
An example of such an application would be a clipboard manager.
This can be assumed to be a subset of ContentProviderExt::formats()
.
§Returns
The storable formats of the provider
fn write_mime_type_future( &self, mime_type: &str, stream: &OutputStream, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>>
Sourcefn value(&self, type_: Type) -> Result<Value, Error>
fn value(&self, type_: Type) -> Result<Value, Error>
Gets the contents of @self stored in @value.
The @value will have been initialized to the GType
the value should be
provided in. This given GType
does not need to be listed in the formats
returned by ContentProviderExt::formats()
. However, if the
given GType
is not supported, this operation can fail and
G_IO_ERROR_NOT_SUPPORTED
will be reported.
§Returns
true
if the value was set successfully. Otherwise
@error will be set to describe the failure.
§value
the GValue
to fill
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.