pub struct EventListener { /* private fields */ }Expand description
Escuta de eventos: o canal auxiliar mais o estado de registro. Criada por
Connection::listen_events.
Implementations§
Source§impl EventListener
impl EventListener
Sourcepub fn wait(&mut self, conn: &mut Connection) -> Result<Vec<String>>
pub fn wait(&mut self, conn: &mut Connection) -> Result<Vec<String>>
Bloqueia até ao menos um dos eventos registrados ser postado, devolvendo os nomes que dispararam. Re-registra automaticamente para a próxima espera (por isso precisa da conexão).
Sourcepub fn cancel(self, conn: &mut Connection) -> Result<()>
pub fn cancel(self, conn: &mut Connection) -> Result<()>
Cancela o registro no servidor (op_cancel_events) e fecha o canal
auxiliar.
Auto Trait Implementations§
impl !RefUnwindSafe for EventListener
impl !Sync for EventListener
impl !UnwindSafe for EventListener
impl Freeze for EventListener
impl Send for EventListener
impl Unpin for EventListener
impl UnsafeUnpin for EventListener
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