logo
pub struct MainloopInner<T> where
    T: MainloopInternalType
{ /* private fields */ }
Expand description

Mainloop inner wrapper.

This contains the actual main loop object pointers, holding both the pointer to the actual opaque main loop C object, and the pointer to the associated API vtable.

An instance of this type will be held, in an Rc ref counted wrapper both in an outer Mainloop wrapper, and by all event objects. With event objects holding a ref-counted copy, this both gives event objects access to the API pointer, which they need, and also it allows us to ensure that event objects do not outlive the main loop object (which internally owns the API object), and thus ensures correct destruction order of event and main loop objects.

Trait Implementations

Executes the destructor for this type. Read more

This is the actual implementation of the ‘inner type’ trait.

It is not possible to replace this with ‘default’ method implementations within the trait itself since the trait does not know about the existence of the struct attributes being accessed.

Gets opaque main loop object pointer.

Warning: The pointer is only valid for the lifetime of this object.

Gets raw API object pointer.

Warning: The pointer is only valid for the lifetime of this object.

Gets main loop API object pointer.

Internal mainloop type.

Returns true if the mainloop implementation supports monotonic based time events.

Create a new instance

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.