Struct ContextBox

Source
pub struct ContextBox<'l> { /* private fields */ }

Implementations§

Source§

impl<'l> ContextBox<'l>

Source

pub fn new( loop_: &'l Loop, properties: Option<PropertiesBox>, ) -> Result<ContextBox<'l>, Error>

Source

pub unsafe fn from_raw(raw: NonNull<pw_context>) -> ContextBox<'l>

Create a ContextBox by taking ownership of a raw pw_context.

§Safety

The provided pointer must point to a valid, well aligned pw_context.

The raw context must not be manually destroyed or moved, as the new ContextBox takes ownership of it.

The lifetime of the returned box is unbounded. The caller is responsible to make sure that the loop used with this context outlives the context.

Source

pub fn into_raw(self) -> NonNull<pw_context>

Methods from Deref<Target = Context>§

Source

pub fn as_raw(&self) -> &pw_context

Source

pub fn as_raw_ptr(&self) -> *mut pw_context

Source

pub fn properties(&self) -> &Properties

Source

pub fn update_properties(&self, properties: &DictRef)

Source

pub fn connect( &self, properties: Option<PropertiesBox>, ) -> Result<CoreBox<'_>, Error>

Source

pub fn connect_fd( &self, fd: OwnedFd, properties: Option<PropertiesBox>, ) -> Result<CoreBox<'_>, Error>

Trait Implementations§

Source§

impl<'l> AsRef<Context> for ContextBox<'l>

Source§

fn as_ref(&self) -> &Context

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'l> Debug for ContextBox<'l>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'l> Deref for ContextBox<'l>

Source§

type Target = Context

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'l> Drop for ContextBox<'l>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'l> Freeze for ContextBox<'l>

§

impl<'l> RefUnwindSafe for ContextBox<'l>

§

impl<'l> !Send for ContextBox<'l>

§

impl<'l> !Sync for ContextBox<'l>

§

impl<'l> Unpin for ContextBox<'l>

§

impl<'l> UnwindSafe for ContextBox<'l>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.