Struct gdk4::ContentFormatsBuilder
source · #[repr(transparent)]pub struct ContentFormatsBuilder { /* private fields */ }
Expand description
A ContentFormatsBuilder
is an auxiliary struct used to create
new ContentFormats
, and should not be kept around.
Implementations§
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: &str) -> Self
pub fn add_mime_type(self, mime_type: &str) -> 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 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<ContentFormatsBuilder> for ContentFormatsBuilder
impl PartialEq<ContentFormatsBuilder> for ContentFormatsBuilder
source§fn eq(&self, other: &ContentFormatsBuilder) -> bool
fn eq(&self, other: &ContentFormatsBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ContentFormatsBuilder> for ContentFormatsBuilder
impl PartialOrd<ContentFormatsBuilder> for ContentFormatsBuilder
source§fn partial_cmp(&self, other: &ContentFormatsBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &ContentFormatsBuilder) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for ContentFormatsBuilder
impl StaticType for ContentFormatsBuilder
source§fn static_type() -> Type
fn static_type() -> Type
Self
.