[][src]Struct libpulse_binding::context::ext_stream_restore::StreamRestore

pub struct StreamRestore { /* fields omitted */ }

A wrapper object providing stream restore routines to a context. Note: Saves a copy of active multi-use closure callbacks, which it frees on drop.

Methods

impl StreamRestore[src]

pub fn test<F>(&mut self, callback: F) -> Operation<dyn FnMut(u32)> where
    F: FnMut(u32) + 'static, 
[src]

Test if this extension module is available in the server.

Panics if the underlying C function returns a null pointer.

pub fn read<F>(
    &mut self,
    callback: F
) -> Operation<dyn FnMut(ListResult<&Info>)> where
    F: FnMut(ListResult<&Info>) + 'static, 
[src]

Read all entries from the stream database.

Panics if the underlying C function returns a null pointer.

pub fn write<F>(
    &mut self,
    mode: UpdateMode,
    data: &[&Info],
    apply_immediately: bool,
    callback: F
) -> Operation<dyn FnMut(bool)> where
    F: FnMut(bool) + 'static, 
[src]

Store entries in the stream database.

The callback must accept a bool, which indicates success.

Panics if the underlying C function returns a null pointer.

pub fn delete<F>(
    &mut self,
    streams: &[&str],
    callback: F
) -> Operation<dyn FnMut(bool)> where
    F: FnMut(bool) + 'static, 
[src]

Delete entries from the stream database.

The callback must accept a bool, which indicates success.

Panics if the underlying C function returns a null pointer.

pub fn subscribe<F>(
    &mut self,
    enable: bool,
    callback: F
) -> Operation<dyn FnMut(bool)> where
    F: FnMut(bool) + 'static, 
[src]

Subscribe to changes in the stream database.

The callback must accept a bool, which indicates success.

Panics if the underlying C function returns a null pointer.

pub fn set_subscribe_cb<F>(&mut self, callback: F) where
    F: FnMut() + 'static, 
[src]

Set the subscription callback that is called when subscribe was called.

Trait Implementations

impl Drop for StreamRestore[src]

impl Sync for StreamRestore[src]

impl Send for StreamRestore[src]

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]