Struct cosync::CosyncInput
source · [−]pub struct CosyncInput<T: ?Sized>(_);
Expand description
A guarded pointer to create a CosyncInputGuard by get and to queue more tasks by queue
Implementations
sourceimpl<T: 'static + ?Sized> CosyncInput<T>
impl<T: 'static + ?Sized> CosyncInput<T>
sourcepub fn get(&mut self) -> CosyncInputGuard<'_, T>
pub fn get(&mut self) -> CosyncInputGuard<'_, T>
Gets the underlying CosyncInputGuard.
sourcepub fn queue<Task, Out>(&self, task: Task) where
Task: Fn(CosyncInput<T>) -> Out + Send + 'static,
Out: Future<Output = ()> + Send,
pub fn queue<Task, Out>(&self, task: Task) where
Task: Fn(CosyncInput<T>) -> Out + Send + 'static,
Out: Future<Output = ()> + Send,
Queues a new task. This goes to the back of queue.
sourcepub fn create_queue_handle(&self) -> CosyncQueueHandle<T>
pub fn create_queue_handle(&self) -> CosyncQueueHandle<T>
Creates a queue handle which can be used to spawn tasks.
Trait Implementations
sourceimpl<T: Debug + ?Sized> Debug for CosyncInput<T>
impl<T: Debug + ?Sized> Debug for CosyncInput<T>
impl<T: ?Sized> Send for CosyncInput<T>
impl<T: ?Sized> Sync for CosyncInput<T>
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for CosyncInput<T> where
T: RefUnwindSafe,
impl<T: ?Sized> Unpin for CosyncInput<T>
impl<T: ?Sized> UnwindSafe for CosyncInput<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more