Struct static_link_module::StaticLink
source · pub struct StaticLink {
pub(crate) args: OnceCell<Vec<StaticLinkArgs>>,
pub(crate) handles: SourceHandlesCell,
}
Expand description
The plugin instance
The instance struct contains any relevant mutable data,
and is initialized by SimplePlugin::init_args.
It is also a shared ref-counted GObject instance
via SimplePluginObject<Self>
,
so it must be accessed and manipulated via &self
.
Fields§
§args: OnceCell<Vec<StaticLinkArgs>>
Arguments specified by the user at plugin initialization
handles: SourceHandlesCell
Mutable data keeps track of any futures that the plugin spawns on the MainLoop.
Implementations§
source§impl StaticLink
impl StaticLink
sourcepub(crate) fn register_type()
pub(crate) fn register_type()
Registers the type only once.
Trait Implementations§
source§impl AsyncPluginImpl for StaticLink
impl AsyncPluginImpl for StaticLink
This makes StaticLink an async plugin that can be used with plugin::plugin_export below.
source§fn enable(&self, this: Self::Type) -> Self::EnableFuture
fn enable(&self, this: Self::Type) -> Self::EnableFuture
The real entry point of the plugin
Spawns as asynchronous main_async for each StaticLinkArgs supplied by the user.
source§fn disable(&self)
fn disable(&self)
Plugin deinitializer
Cleans up after itself by cancelling any pending futures
that were previously spawned by enable
type EnableFuture = Pin<Box<dyn Future<Output = Result<(), Error>>>>
fn register_source(&self, source: SourceId)
source§impl Default for StaticLink
impl Default for StaticLink
source§fn default() -> StaticLink
fn default() -> StaticLink
source§impl ObjectImpl for StaticLink
impl ObjectImpl for StaticLink
source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
source§fn set_property(&self, _id: usize, _value: &Value, _pspec: &ParamSpec)
fn set_property(&self, _id: usize, _value: &Value, _pspec: &ParamSpec)
source§fn constructed(&self)
fn constructed(&self)
source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property")
.fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
source§impl ObjectImpl for StaticLink
impl ObjectImpl for StaticLink
fn supported_features(&self, object: &Self::Type) -> ObjectFeatures
fn activate_get_next_step( &self, object: &Self::Type, transition: FeatureActivationTransition, step: u32, features: ObjectFeatures ) -> u32
fn activate_execute_step( &self, object: &Self::Type, transition: FeatureActivationTransition, step: u32, features: ObjectFeatures )
fn deactivate(&self, object: &Self::Type, features: ObjectFeatures)
source§impl ObjectSubclass for StaticLink
impl ObjectSubclass for StaticLink
§type Interfaces = ()
type Interfaces = ()
§type Class = ClassStruct<StaticLink>
type Class = ClassStruct<StaticLink>
§type Instance = InstanceStruct<StaticLink>
type Instance = InstanceStruct<StaticLink>
§type Type = SimplePluginObject<StaticLink>
type Type = SimplePluginObject<StaticLink>
wrapper!
§type ParentType = Plugin
type ParentType = Plugin
source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
source§fn class_init(_klass: &mut Self::Class)
fn class_init(_klass: &mut Self::Class)
source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
source§fn instance_init(_obj: &InitializingObject<Self>)
fn instance_init(_obj: &InitializingObject<Self>)
source§impl ObjectSubclassType for StaticLink
impl ObjectSubclassType for StaticLink
source§impl SimplePlugin for StaticLink
impl SimplePlugin for StaticLink
This makes StaticLink a plugin that can be used with plugin::simple_plugin_subclass below.
Auto Trait Implementations§
impl !Freeze for StaticLink
impl !RefUnwindSafe for StaticLink
impl Send for StaticLink
impl !Sync for StaticLink
impl Unpin for StaticLink
impl UnwindSafe for StaticLink
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
source§impl<T> ModuleExport for T
impl<T> ModuleExport for T
source§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
fn parent_class(&self) -> &WpObjectClass
fn parent_supported_features( &self, object: &<T as ObjectSubclass>::Type ) -> ObjectFeatures
fn parent_deactivate( &self, object: &<T as ObjectSubclass>::Type, features: ObjectFeatures )
fn parent_activate_get_next_step( &self, object: &<T as ObjectSubclass>::Type, transition: FeatureActivationTransition, step: u32, features: ObjectFeatures ) -> u32
fn parent_activate_execute_step( &self, object: &<T as ObjectSubclass>::Type, transition: FeatureActivationTransition, step: u32, features: ObjectFeatures )
source§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed()
.source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify()
.source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed()
.source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value]
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value] ) -> Option<Value>
source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
source§fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
source§fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self
.