Trait Preset Ext
Source pub trait PresetExt: IsA<Preset> + 'static {
// Provided methods
fn delete_preset(&self, name: &str) -> Result<(), BoolError> { ... }
fn meta(&self, name: &str, tag: &str) -> Option<GString> { ... }
fn preset_names(&self) -> Vec<GString> { ... }
fn property_names(&self) -> Vec<GString> { ... }
fn is_editable(&self) -> bool { ... }
fn load_preset(&self, name: &str) -> Result<(), BoolError> { ... }
fn rename_preset(
&self,
old_name: &str,
new_name: &str,
) -> Result<(), BoolError> { ... }
fn save_preset(&self, name: &str) -> Result<(), BoolError> { ... }
fn set_meta(
&self,
name: &str,
tag: &str,
value: Option<&str>,
) -> Result<(), BoolError> { ... }
}Provided Methods§
Sourcefn meta(&self, name: &str, tag: &str) -> Option<GString>
fn meta(&self, name: &str, tag: &str) -> Option<GString>
Gets the value for an existing meta data tag. Meta data tag names can be
something like e.g. “comment”. Returned values need to be released when done.
§name
preset name
§tag
meta data item name
§Returns
true for success, false if e.g. there is no preset with that name
or no value for the given tag
§value
value
Sourcefn preset_names(&self) -> Vec<GString>
fn preset_names(&self) -> Vec<GString>
Sourcefn property_names(&self) -> Vec<GString>
fn property_names(&self) -> Vec<GString>
Get a the names of the GObject properties that can be used for presets.
§Returns
an
array of property names which should be freed with g_strfreev() after use.
Sourcefn is_editable(&self) -> bool
fn is_editable(&self) -> bool
Sourcefn set_meta(
&self,
name: &str,
tag: &str,
value: Option<&str>,
) -> Result<(), BoolError>
fn set_meta( &self, name: &str, tag: &str, value: Option<&str>, ) -> Result<(), BoolError>
Sets a new value for an existing meta data item or adds a new item. Meta
data tag names can be something like e.g. “comment”. Supplying None for the
value will unset an existing value.
§name
preset name
§tag
meta data item name
§value
new value
§Returns
true for success, false if e.g. there is no preset with that name
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.