pub struct ContentFormatsBuilder { /* private fields */ }
Expand description
A ContentFormatsBuilder
is an auxiliary struct used to create
new ContentFormats
, and should not be kept around.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl ContentFormatsBuilder
impl ContentFormatsBuilder
Sourcepub fn as_ptr(&self) -> *mut GdkContentFormatsBuilder
pub fn as_ptr(&self) -> *mut GdkContentFormatsBuilder
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GdkContentFormatsBuilder) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GdkContentFormatsBuilder) -> &Self
Borrows the underlying C value.
Source§impl ContentFormatsBuilder
impl ContentFormatsBuilder
Sourcepub fn new() -> ContentFormatsBuilder
pub fn new() -> ContentFormatsBuilder
Create a new ContentFormatsBuilder
object.
The resulting builder would create an empty ContentFormats
.
Use addition functions to add types to it.
§Returns
a new ContentFormatsBuilder
Source§impl ContentFormatsBuilder
impl ContentFormatsBuilder
Sourcepub fn add_formats(self, formats: &ContentFormats) -> Self
pub fn add_formats(self, formats: &ContentFormats) -> Self
Appends all formats from @formats to @self, skipping those that already exist.
§formats
the formats to add
Sourcepub fn add_mime_type(self, mime_type: impl IntoGStr) -> Self
pub fn add_mime_type(self, mime_type: impl IntoGStr) -> Self
Sourcepub fn build(self) -> ContentFormats
pub fn build(self) -> ContentFormats
Creates a new ContentFormats
from the given @self.
The given ContentFormatsBuilder
is reset once this function returns;
you cannot call this function multiple times on the same @self instance.
This function is intended primarily for bindings. C code should use
Gdk::ContentFormatsBuilder::free_to_formats()
.
§Returns
the newly created ContentFormats
with all the formats added to @self
Trait Implementations§
Source§impl Clone for ContentFormatsBuilder
impl Clone for ContentFormatsBuilder
Source§impl Debug for ContentFormatsBuilder
impl Debug for ContentFormatsBuilder
Source§impl Default for ContentFormatsBuilder
impl Default for ContentFormatsBuilder
Source§impl From<ContentFormatsBuilder> for Value
impl From<ContentFormatsBuilder> for Value
Source§fn from(s: ContentFormatsBuilder) -> Self
fn from(s: ContentFormatsBuilder) -> Self
Source§impl HasParamSpec for ContentFormatsBuilder
impl HasParamSpec for ContentFormatsBuilder
type ParamSpec = ParamSpecBoxed
Source§type SetValue = ContentFormatsBuilder
type SetValue = ContentFormatsBuilder
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, ContentFormatsBuilder>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for ContentFormatsBuilder
impl Hash for ContentFormatsBuilder
Source§impl Ord for ContentFormatsBuilder
impl Ord for ContentFormatsBuilder
Source§fn cmp(&self, other: &ContentFormatsBuilder) -> Ordering
fn cmp(&self, other: &ContentFormatsBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ContentFormatsBuilder
impl PartialEq for ContentFormatsBuilder
Source§impl PartialOrd for ContentFormatsBuilder
impl PartialOrd for ContentFormatsBuilder
Source§impl StaticType for ContentFormatsBuilder
impl StaticType for ContentFormatsBuilder
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.