pub struct RtQueue<T: Copy> { /* private fields */ }Expand description
Главная RT-safe очередь
§Пример
use rill_core::queues::RtQueue;
// Создаём очередь для команд
let queue = RtQueue::<i32>::new(1024);
// Поток управления (soft RT)
queue.push(42).unwrap();
// Аудиопоток (hard RT)
if let Some(cmd) = queue.pop() {
println!("Got command: {}", cmd);
}Implementations§
Trait Implementations§
impl<T: Copy + Send> Send for RtQueue<T>
impl<T: Copy + Sync> Sync for RtQueue<T>
Auto Trait Implementations§
impl<T> !Freeze for RtQueue<T>
impl<T> !RefUnwindSafe for RtQueue<T>
impl<T> Unpin for RtQueue<T>where
T: Unpin,
impl<T> UnsafeUnpin for RtQueue<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for RtQueue<T>where
T: UnwindSafe + RefUnwindSafe,
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