pub struct TemplateCallbacks {}
Expand description
Struct used as a collection of GTK template callbacks.
Implementations§
Source§impl TemplateCallbacks
impl TemplateCallbacks
Sourcepub fn string_not_empty(string: Option<&str>) -> bool
pub fn string_not_empty(string: Option<&str>) -> bool
Returns true
when the given string is not empty.
Sourcepub fn unwrap_string_or_empty(string: Option<&str>) -> &str
pub fn unwrap_string_or_empty(string: Option<&str>) -> &str
Returns the contained string or an empty string.
Sourcepub fn object_is_some(obj: Option<&Object>) -> bool
pub fn object_is_some(obj: Option<&Object>) -> bool
Returns true
when the given Option<glib::Object>
is Some
.
Sourcepub fn invert_boolean(boolean: bool) -> bool
pub fn invert_boolean(boolean: bool) -> bool
Inverts the given boolean.
Sourcepub fn guint_is_zero(u: u32) -> bool
pub fn guint_is_zero(u: u32) -> bool
Whether the given guint
is equal to zero.
Trait Implementations§
Source§impl CompositeTemplateCallbacks for TemplateCallbacks
impl CompositeTemplateCallbacks for TemplateCallbacks
const CALLBACKS: &'static [TemplateCallback]
Source§fn bind_template_callbacks<T>(klass: &mut T)where
T: WidgetClassExt,
fn bind_template_callbacks<T>(klass: &mut T)where
T: WidgetClassExt,
Binds the template callbacks from this type into the default template
scope for
klass
.Source§fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str)where
T: WidgetClassExt,
fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str)where
T: WidgetClassExt,
Binds the template callbacks from this type into the default template
scope for
klass
, prepending prefix
to each callback name.Source§fn add_callbacks_to_scope(scope: &BuilderRustScope)
fn add_callbacks_to_scope(scope: &BuilderRustScope)
Binds the template callbacks from this type into
scope
.Source§fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
Binds the template callbacks from this type into
scope
, prepending
prefix
to each callback name.Auto Trait Implementations§
impl Freeze for TemplateCallbacks
impl RefUnwindSafe for TemplateCallbacks
impl Send for TemplateCallbacks
impl Sync for TemplateCallbacks
impl Unpin for TemplateCallbacks
impl UnwindSafe for TemplateCallbacks
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more