Struct gstreamer::Bus [−][src]
pub struct Bus(_);
The crate::Bus
is an object responsible for delivering crate::Message
packets in
a first-in first-out way from the streaming threads (see [crate::Task
]) to the
application.
Since the application typically only wants to deal with delivery of these messages from one thread, the GstBus will marshall the messages between different threads. This is important since the actual streaming of media is done in another thread than the application.
The GstBus provides support for crate::glib::Source
based notifications. This makes it
possible to handle the delivery in the glib mainloop.
The crate::glib::Source
callback function [Self::async_signal_func()
] can be used to
convert all bus messages into signal emissions.
A message is posted on the bus with the Self::post()
method. With the
Self::peek()
and Self::pop()
methods one can look at or retrieve a
previously posted message.
The bus can be polled with the [Self::poll()
] method. This methods blocks
up to the specified timeout value until one of the specified messages types
is posted on the bus. The application can then Self::pop()
the messages
from the bus to handle them.
Alternatively the application can register an asynchronous bus function
using [Self::add_watch_full()
] or Self::add_watch()
. This function will
install a crate::glib::Source
in the default glib main loop and will deliver messages
a short while after they have been posted. Note that the main loop should
be running for the asynchronous callbacks.
It is also possible to get messages from the bus without any thread
marshalling with the Self::set_sync_handler()
method. This makes it
possible to react to a message in the same thread that posted the
message on the bus. This should only be used if the application is able
to deal with messages from different threads.
Every crate::Pipeline
has one bus.
Note that a crate::Pipeline
will set its bus into flushing state when changing
from READY to NULL state.
Implements
Implementations
impl Bus
[src]
impl Bus
[src]pub fn add_signal_watch(&self)
[src]
pub fn add_signal_watch(&self)
[src]Adds a bus signal watch to the default main context with the default priority
(G_PRIORITY_DEFAULT
). It is also possible to use a non-default
main context set up using crate::glib::MainContext::push_thread_default()
(before
one had to create a bus watch source and attach it to the desired main
context ‘manually’).
After calling this statement, the bus will emit the “message” signal for each message posted on the bus.
This function may be called multiple times. To clean up, the caller is
responsible for calling Self::remove_signal_watch()
as many times as this
function is called.
MT safe.
pub fn disable_sync_message_emission(&self)
[src]
pub fn disable_sync_message_emission(&self)
[src]Instructs GStreamer to stop emitting the “sync-message” signal for this bus.
See Self::enable_sync_message_emission()
for more information.
In the event that multiple pieces of code have called
Self::enable_sync_message_emission()
, the sync-message emissions will only
be stopped after all calls to Self::enable_sync_message_emission()
were
“cancelled” by calling this function. In this way the semantics are exactly
the same as [crate::prelude::GstObjectExt::ref()
] that which calls enable should also call
disable.
MT safe.
pub fn enable_sync_message_emission(&self)
[src]
pub fn enable_sync_message_emission(&self)
[src]Instructs GStreamer to emit the “sync-message” signal after running the bus’s sync handler. This function is here so that code can ensure that they can synchronously receive messages without having to affect what the bin’s sync handler is.
This function may be called multiple times. To clean up, the caller is
responsible for calling Self::disable_sync_message_emission()
as many times
as this function is called.
While this function looks similar to Self::add_signal_watch()
, it is not
exactly the same – this function enables synchronous emission of
signals when messages arrive; Self::add_signal_watch()
adds an idle callback
to pop messages off the bus asynchronously. The sync-message signal
comes from the thread of whatever object posted the message; the “message”
signal is marshalled to the main thread via the main loop.
MT safe.
pub fn have_pending(&self) -> bool
[src]
pub fn have_pending(&self) -> bool
[src]pub fn peek(&self) -> Option<Message>
[src]
pub fn peek(&self) -> Option<Message>
[src]Peek the message on the top of the bus’ queue. The message will remain on the bus’ message queue. A reference is returned, and needs to be unreffed by the caller.
Returns
the crate::Message
that is on the
bus, or None
if the bus is empty.
MT safe.
pub fn pop(&self) -> Option<Message>
[src]
pub fn pop(&self) -> Option<Message>
[src]Get a message from the bus.
Returns
the crate::Message
that is on the
bus, or None
if the bus is empty. The message is taken from
the bus and needs to be unreffed with gst_message_unref()
after
usage.
MT safe.
pub fn post(&self, message: &Message) -> Result<(), BoolError>
[src]
pub fn post(&self, message: &Message) -> Result<(), BoolError>
[src]Post a message on the given bus. Ownership of the message is taken by the bus.
message
the crate::Message
to post
Returns
true
if the message could be posted, false
if the bus is flushing.
MT safe.
pub fn remove_signal_watch(&self)
[src]
pub fn remove_signal_watch(&self)
[src]Removes a signal watch previously added with Self::add_signal_watch()
.
MT safe.
pub fn remove_watch(&self) -> Result<(), BoolError>
[src]
pub fn remove_watch(&self) -> Result<(), BoolError>
[src]pub fn set_flushing(&self, flushing: bool)
[src]
pub fn set_flushing(&self, flushing: bool)
[src]If flushing
, flush out and unref any messages queued in the bus. Releases
references to the message origin objects. Will flush future messages until
Self::set_flushing()
sets flushing
to false
.
MT safe.
flushing
whether or not to flush the bus
pub fn timed_pop(&self, timeout: ClockTime) -> Option<Message>
[src]
pub fn timed_pop(&self, timeout: ClockTime) -> Option<Message>
[src]Get a message from the bus, waiting up to the specified timeout.
If timeout
is 0, this function behaves like Self::pop()
. If timeout
is
GST_CLOCK_TIME_NONE
, this function will block forever until a message was
posted on the bus.
timeout
a timeout
Returns
the crate::Message
that is on the
bus after the specified timeout or None
if the bus is empty
after the timeout expired. The message is taken from the bus
and needs to be unreffed with gst_message_unref()
after usage.
MT safe.
pub fn connect_message<F: Fn(&Bus, &Message) + Send + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId
[src]
pub fn connect_message<F: Fn(&Bus, &Message) + Send + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId
[src]A message has been posted on the bus. This signal is emitted from a GSource added to the mainloop. this signal will only be emitted when there is a mainloop running.
message
the message that has been posted asynchronously
pub fn connect_sync_message<F: Fn(&Bus, &Message) + Send + Sync + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId
[src]
pub fn connect_sync_message<F: Fn(&Bus, &Message) + Send + Sync + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId
[src]A message has been posted on the bus. This signal is emitted from the thread that posted the message so one has to be careful with locking.
This signal will not be emitted by default, you have to call
Self::enable_sync_message_emission()
before.
message
the message that has been posted synchronously
impl Bus
[src]
impl Bus
[src]pub fn add_signal_watch_full(&self, priority: Priority)
[src]
pub fn add_signal_watch_full(&self, priority: Priority)
[src]Adds a bus signal watch to the default main context with the given priority
(e.g. G_PRIORITY_DEFAULT
). It is also possible to use a non-default main
context set up using crate::glib::MainContext::push_thread_default()
(before one had to create a bus watch source and attach it to the desired
main context ‘manually’).
After calling this statement, the bus will emit the “message” signal for each message posted on the bus when the main loop is running.
This function may be called multiple times. To clean up, the caller is
responsible for calling Self::remove_signal_watch()
as many times as this
function is called.
There can only be a single bus watch per bus, you must remove any signal watch before you can set another type of watch.
MT safe.
priority
The priority of the watch.
pub fn create_watch<F>(
&self,
name: Option<&str>,
priority: Priority,
func: F
) -> Source where
F: FnMut(&Bus, &Message) -> Continue + Send + 'static,
[src]
pub fn create_watch<F>(
&self,
name: Option<&str>,
priority: Priority,
func: F
) -> Source where
F: FnMut(&Bus, &Message) -> Continue + Send + 'static,
[src]Create watch for this bus. The GSource will be dispatched whenever a message is on the bus. After the GSource is dispatched, the message is popped off the bus and unreffed.
Returns
a crate::glib::Source
that can be added to a mainloop.
pub fn add_watch<F>(&self, func: F) -> Result<SourceId, BoolError> where
F: FnMut(&Bus, &Message) -> Continue + Send + 'static,
[src]
pub fn add_watch<F>(&self, func: F) -> Result<SourceId, BoolError> where
F: FnMut(&Bus, &Message) -> Continue + Send + 'static,
[src]Adds a bus watch to the default main context with the default priority
(G_PRIORITY_DEFAULT
). It is also possible to use a non-default main
context set up using crate::glib::MainContext::push_thread_default()
(before
one had to create a bus watch source and attach it to the desired main
context ‘manually’).
This function is used to receive asynchronous messages in the main loop. There can only be a single bus watch per bus, you must remove it before you can set a new one.
The bus watch will only work if a GLib main loop is being run.
The watch can be removed using Self::remove_watch()
or by returning false
from func
. If the watch was added to the default main context it is also
possible to remove the watch using crate::glib::Source::remove()
.
The bus watch will take its own reference to the self
, so it is safe to unref
self
using [crate::prelude::GstObjectExt::unref()
] after setting the bus watch.
MT safe.
func
A function to call when a message is received.
user_data
user data passed to func
.
Returns
The event source id or 0 if self
already got an event source.
pub fn add_watch_local<F>(&self, func: F) -> Result<SourceId, BoolError> where
F: FnMut(&Bus, &Message) -> Continue + 'static,
[src]
F: FnMut(&Bus, &Message) -> Continue + 'static,
pub fn set_sync_handler<F>(&self, func: F) where
F: Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static,
[src]
pub fn set_sync_handler<F>(&self, func: F) where
F: Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static,
[src]Sets the synchronous handler on the bus. The function will be called every time a new message is posted on the bus. Note that the function will be called in the same thread context as the posting object. This function is usually only called by the creator of the bus. Applications should handle messages asynchronously using the gst_bus watch and poll functions.
Before 1.16.3 it was not possible to replace an existing handler and
clearing an existing handler with None
was not thread-safe.
func
The handler function to install
user_data
User data that will be sent to the handler function.
notify
called when user_data
becomes unused
pub fn unset_sync_handler(&self)
[src]
pub fn iter(&self) -> Iter<'_>ⓘ
[src]
pub fn iter_timed(&self, timeout: ClockTime) -> Iter<'_>ⓘ
[src]
pub fn iter_filtered<'a>(
&'a self,
msg_types: &'a [MessageType]
) -> impl Iterator<Item = Message> + 'a
[src]
&'a self,
msg_types: &'a [MessageType]
) -> impl Iterator<Item = Message> + 'a
pub fn iter_timed_filtered<'a>(
&'a self,
timeout: ClockTime,
msg_types: &'a [MessageType]
) -> impl Iterator<Item = Message> + 'a
[src]
&'a self,
timeout: ClockTime,
msg_types: &'a [MessageType]
) -> impl Iterator<Item = Message> + 'a
pub fn timed_pop_filtered(
&self,
timeout: ClockTime,
msg_types: &[MessageType]
) -> Option<Message>
[src]
pub fn timed_pop_filtered(
&self,
timeout: ClockTime,
msg_types: &[MessageType]
) -> Option<Message>
[src]Get a message from the bus whose type matches the message type mask types
,
waiting up to the specified timeout (and discarding any messages that do not
match the mask provided).
If timeout
is 0, this function behaves like Self::pop_filtered()
. If
timeout
is GST_CLOCK_TIME_NONE
, this function will block forever until a
matching message was posted on the bus.
timeout
a timeout in nanoseconds, or GST_CLOCK_TIME_NONE to wait forever
types
message types to take into account, GST_MESSAGE_ANY for any type
Returns
a crate::Message
matching the
filter in types
, or None
if no matching message was found on
the bus until the timeout expired. The message is taken from
the bus and needs to be unreffed with gst_message_unref()
after
usage.
MT safe.
pub fn pop_filtered(&self, msg_types: &[MessageType]) -> Option<Message>
[src]
pub fn pop_filtered(&self, msg_types: &[MessageType]) -> Option<Message>
[src]Get a message matching type_
from the bus. Will discard all messages on
the bus that do not match type_
and that have been posted before the first
message that does match type_
. If there is no message matching type_
on
the bus, all messages will be discarded. It is not possible to use message
enums beyond crate::MessageType::Extended
in the events
mask.
types
message types to take into account
Returns
the next crate::Message
matching
type_
that is on the bus, or None
if the bus is empty or there
is no message matching type_
. The message is taken from the bus
and needs to be unreffed with gst_message_unref()
after usage.
MT safe.
pub fn stream(&self) -> BusStream
[src]
pub fn stream_filtered<'a>(
&self,
message_types: &'a [MessageType]
) -> impl Stream<Item = Message> + Unpin + Send + 'a
[src]
&self,
message_types: &'a [MessageType]
) -> impl Stream<Item = Message> + Unpin + Send + 'a
Trait Implementations
impl Ord for Bus
[src]
impl Ord for Bus
[src]impl ParentClassIs for Bus
[src]
impl ParentClassIs for Bus
[src]impl<T: ObjectType> PartialEq<T> for Bus
[src]
impl<T: ObjectType> PartialEq<T> for Bus
[src]impl<T: ObjectType> PartialOrd<T> for Bus
[src]
impl<T: ObjectType> PartialOrd<T> for Bus
[src]fn partial_cmp(&self, other: &T) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &T) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl StaticType for Bus
[src]
impl StaticType for Bus
[src]fn static_type() -> Type
[src]
fn static_type() -> Type
[src]Returns the type identifier of Self
.
impl WindowsBusExtManual for Bus
[src]
impl WindowsBusExtManual for Bus
[src]impl Eq for Bus
[src]
impl IsA<Object> for Bus
[src]
impl Send for Bus
[src]
impl StructuralEq for Bus
[src]
impl Sync for Bus
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Cast for T where
T: ObjectType,
[src]
impl<T> Cast for T where
T: ObjectType,
[src]fn upcast<T>(self) -> T where
Self: IsA<T>,
T: ObjectType,
[src]
fn upcast<T>(self) -> T where
Self: IsA<T>,
T: ObjectType,
[src]Upcasts an object to a superclass or interface T
. Read more
fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: ObjectType,
[src]
fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: ObjectType,
[src]Upcasts an object to a reference of its superclass or interface T
. Read more
fn downcast<T>(self) -> Result<T, Self> where
Self: CanDowncast<T>,
T: ObjectType,
[src]
fn downcast<T>(self) -> Result<T, Self> where
Self: CanDowncast<T>,
T: ObjectType,
[src]Tries to downcast to a subclass or interface implementor T
. Read more
fn downcast_ref<T>(&self) -> Option<&T> where
Self: CanDowncast<T>,
T: ObjectType,
[src]
fn downcast_ref<T>(&self) -> Option<&T> where
Self: CanDowncast<T>,
T: ObjectType,
[src]Tries to downcast to a reference of its subclass or interface implementor T
. Read more
fn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
[src]
fn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
[src]Tries to cast to an object of type T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read more
fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
[src]
fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
[src]Tries to cast to reference to an object of type T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read more
unsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
[src]
unsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
[src]Casts to T
unconditionally. Read more
unsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
[src]
unsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
[src]Casts to &T
unconditionally. Read more
impl<T> ObjectExt for T where
T: ObjectType,
[src]
impl<T> ObjectExt for T where
T: ObjectType,
[src]pub fn is<U>(&self) -> bool where
U: StaticType,
[src]
pub fn is<U>(&self) -> bool where
U: StaticType,
[src]Returns true
if the object is an instance of (can be cast to) T
.
pub fn type_(&self) -> Type
[src]
pub fn object_class(&self) -> &Class<Object>
[src]
pub fn class(&self) -> &Class<T> where
T: IsClass,
[src]
T: IsClass,
pub fn class_of<U>(&self) -> Option<&Class<U>> where
U: IsClass,
[src]
U: IsClass,
pub fn interface<U>(&self) -> Option<InterfaceRef<'_, U>> where
U: IsInterface,
[src]
U: IsInterface,
pub fn set_properties(
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
[src]
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
pub fn set_properties_from_value(
&self,
property_values: &[(&str, Value)]
) -> Result<(), BoolError>
[src]
&self,
property_values: &[(&str, Value)]
) -> Result<(), BoolError>
pub fn set_property<'a, N, V>(
&self,
property_name: N,
value: V
) -> Result<(), BoolError> where
V: ToValue,
N: Into<&'a str>,
[src]
&self,
property_name: N,
value: V
) -> Result<(), BoolError> where
V: ToValue,
N: Into<&'a str>,
pub fn set_property_from_value<'a, N>(
&self,
property_name: N,
value: &Value
) -> Result<(), BoolError> where
N: Into<&'a str>,
[src]
&self,
property_name: N,
value: &Value
) -> Result<(), BoolError> where
N: Into<&'a str>,
pub fn property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>> where
QD: 'static,
[src]
pub unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>> where
QD: 'static,
[src]Safety Read more
pub unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD> where
QD: 'static,
[src]
pub unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD> where
QD: 'static,
[src]Safety Read more
pub unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>> where
QD: 'static,
[src]
pub unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>> where
QD: 'static,
[src]Safety Read more
pub unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD> where
QD: 'static,
[src]
pub unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD> where
QD: 'static,
[src]Safety Read more
pub fn block_signal(&self, handler_id: &SignalHandlerId)
[src]
pub fn unblock_signal(&self, handler_id: &SignalHandlerId)
[src]
pub fn stop_signal_emission(&self, signal_name: &str)
[src]
pub fn disconnect(&self, handler_id: SignalHandlerId)
[src]
pub fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
[src]
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
pub fn connect_notify_local<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec),
[src]
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec),
pub unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
[src]
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
pub fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn notify_by_pspec(&self, pspec: &ParamSpec)
[src]
pub fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn list_properties(&self) -> Vec<ParamSpec, Global>
[src]
pub fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
pub fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
[src]
pub fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
[src]Same as connect
but takes a SignalId
instead of a signal name.
pub fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
pub fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
[src]
pub fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
[src]Same as connect_local
but takes a SignalId
instead of a signal name.
pub unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
pub unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
[src]
pub unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
[src]Same as connect_unsafe
but takes a SignalId
instead of a signal name.
pub fn emit(
&self,
signal_id: SignalId,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
[src]
pub fn emit(
&self,
signal_id: SignalId,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
[src]Emit signal by signal id.
pub fn emit_with_details(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
[src]
pub fn emit_with_details(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
[src]Emit signal with details by signal id.
pub fn emit_by_name<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
[src]
pub fn emit_by_name<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
[src]Emit signal by it’s name.
pub fn downgrade(&self) -> WeakRef<T>
[src]
pub fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
O: ObjectType,
N: Into<&'a str>,
M: Into<&'a str>,
[src]
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
O: ObjectType,
N: Into<&'a str>,
M: Into<&'a str>,
pub fn ref_count(&self) -> u32
[src]
pub fn emit_with_values(
&self,
signal_id: SignalId,
args: &[Value]
) -> Result<Option<Value>, BoolError>
[src]
pub fn emit_with_values(
&self,
signal_id: SignalId,
args: &[Value]
) -> Result<Option<Value>, BoolError>
[src]Same as emit
but takes Value
for the arguments.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
[src]
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
[src]pub fn to_send_value(&self) -> SendValue
[src]
pub fn to_send_value(&self) -> SendValue
[src]Returns a SendValue
clone of self
.
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,
[src]
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,