Struct audio_streams::shm_streams::MockShmStreamSource
source · pub struct MockShmStreamSource {
last_stream: Arc<(Mutex<Option<MockShmStream>>, Condvar)>,
}
Expand description
Source of MockShmStream
objects.
Fields§
§last_stream: Arc<(Mutex<Option<MockShmStream>>, Condvar)>
Implementations§
source§impl MockShmStreamSource
impl MockShmStreamSource
pub fn new() -> Self
sourcepub fn get_last_stream(&self) -> MockShmStream
pub fn get_last_stream(&self) -> MockShmStream
Get the last stream that has been created from this source. If no stream has been created, block until one has.
Trait Implementations§
source§impl Clone for MockShmStreamSource
impl Clone for MockShmStreamSource
source§fn clone(&self) -> MockShmStreamSource
fn clone(&self) -> MockShmStreamSource
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for MockShmStreamSource
impl Default for MockShmStreamSource
source§fn default() -> MockShmStreamSource
fn default() -> MockShmStreamSource
Returns the “default value” for a type. Read more
source§impl<E: Error> ShmStreamSource<E> for MockShmStreamSource
impl<E: Error> ShmStreamSource<E> for MockShmStreamSource
source§fn new_stream(
&mut self,
_direction: StreamDirection,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
_effects: &[StreamEffect],
_client_shm: &dyn SharedMemory<Error = E>,
_buffer_offsets: [u64; 2]
) -> Result<Box<dyn ShmStream>, BoxError>
fn new_stream( &mut self, _direction: StreamDirection, num_channels: usize, format: SampleFormat, frame_rate: u32, buffer_size: usize, _effects: &[StreamEffect], _client_shm: &dyn SharedMemory<Error = E>, _buffer_offsets: [u64; 2] ) -> Result<Box<dyn ShmStream>, BoxError>
Auto Trait Implementations§
impl RefUnwindSafe for MockShmStreamSource
impl Send for MockShmStreamSource
impl Sync for MockShmStreamSource
impl Unpin for MockShmStreamSource
impl UnwindSafe for MockShmStreamSource
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
Mutably borrows from an owned value. Read more