pub trait RTSPServerExtManual: IsA<RTSPServer> + 'static {
// Provided method
fn attach(
&self,
context: Option<&MainContext>,
) -> Result<SourceId, BoolError> { ... }
}
Provided Methods§
Sourcefn attach(&self, context: Option<&MainContext>) -> Result<SourceId, BoolError>
fn attach(&self, context: Option<&MainContext>) -> Result<SourceId, BoolError>
Attaches self
to context
. When the mainloop for context
is run, the
server will be dispatched. When context
is None
, the default context will be
used).
This function should be called when the server properties and urls are fully configured and the server is ready to start.
This takes a reference on self
until the source is destroyed. Note that
if context
is not the default main context as returned by
glib::MainContext::default()
(or None
), [glib::Source::remove()
][crate::glib::Source::remove()] cannot be used to
destroy the source. In that case it is recommended to use
RTSPServerExt::create_source()
and attach it to context
manually.
§context
§Returns
the ID (greater than 0) for the source within the GMainContext.
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.