glib::prelude

Trait ParamSpecBuilderExt

Source
pub trait ParamSpecBuilderExt<'a>: Sized {
Show 15 methods // Required methods fn set_nick(&mut self, nick: Option<&'a str>); fn set_blurb(&mut self, blurb: Option<&'a str>); fn set_flags(&mut self, flags: ParamFlags); fn current_flags(&self) -> ParamFlags; // Provided methods fn nick(self, nick: &'a str) -> Self { ... } fn blurb(self, blurb: &'a str) -> Self { ... } fn flags(self, flags: ParamFlags) -> Self { ... } fn read_only(self) -> Self { ... } fn write_only(self) -> Self { ... } fn readwrite(self) -> Self { ... } fn construct(self) -> Self { ... } fn construct_only(self) -> Self { ... } fn lax_validation(self) -> Self { ... } fn explicit_notify(self) -> Self { ... } fn deprecated(self) -> Self { ... }
}
Expand description

A trait implemented by the various ParamSpec builder types.

It is useful for providing a builder pattern for ParamSpec defined outside of GLib like in GStreamer or GTK 4.

Required Methods§

Source

fn set_nick(&mut self, nick: Option<&'a str>)

Implementation detail.

Source

fn set_blurb(&mut self, blurb: Option<&'a str>)

Implementation detail.

Source

fn set_flags(&mut self, flags: ParamFlags)

Implementation detail.

Source

fn current_flags(&self) -> ParamFlags

Implementation detail.

Provided Methods§

Source

fn nick(self, nick: &'a str) -> Self

By default, the nickname of its redirect target will be used if it has one. Otherwise, self.name will be used.

Source

fn blurb(self, blurb: &'a str) -> Self

Default: None

Source

fn flags(self, flags: ParamFlags) -> Self

Default: glib::ParamFlags::READWRITE

Source

fn read_only(self) -> Self

Mark the property as read only and drops the READWRITE flag set by default.

Source

fn write_only(self) -> Self

Mark the property as write only and drops the READWRITE flag set by default.

Source

fn readwrite(self) -> Self

Mark the property as readwrite, it is the default value.

Source

fn construct(self) -> Self

Mark the property as construct

Source

fn construct_only(self) -> Self

Mark the property as construct only

Source

fn lax_validation(self) -> Self

Mark the property as lax validation

Source

fn explicit_notify(self) -> Self

Mark the property as explicit notify

Source

fn deprecated(self) -> Self

Mark the property as deprecated

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.

Implementors§

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecBooleanBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecCharBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecDoubleBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecFloatBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecGTypeBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecInt64Builder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecIntBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecLongBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecParamBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecPointerBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecStringBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecUCharBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecUInt64Builder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecUIntBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecULongBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecUnicharBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecValueArrayBuilder<'a>

Source§

impl<'a> ParamSpecBuilderExt<'a> for ParamSpecVariantBuilder<'a>

Source§

impl<'a, T: StaticType + FromGlib<i32> + IntoGlib<GlibType = i32>> ParamSpecBuilderExt<'a> for ParamSpecEnumBuilder<'a, T>

Source§

impl<'a, T: StaticType + FromGlib<u32> + IntoGlib<GlibType = u32>> ParamSpecBuilderExt<'a> for ParamSpecFlagsBuilder<'a, T>

Source§

impl<'a, T: StaticType> ParamSpecBuilderExt<'a> for ParamSpecBoxedBuilder<'a, T>

Source§

impl<'a, T: StaticType> ParamSpecBuilderExt<'a> for ParamSpecObjectBuilder<'a, T>