pub enum ConnectionCB<'a> {
CB(Box<dyn FnMut(StreamHandle, Result<u32>) + 'a>),
Nil,
}
Variants§
Implementations§
source§impl<'a> ConnectionCB<'a>
impl<'a> ConnectionCB<'a>
pub fn new<CB: Into<ConnectionCB<'a>>>(cb: CB) -> ConnectionCB<'a>
pub fn is_nil(&self) -> bool
Trait Implementations§
source§impl<'a> Default for ConnectionCB<'a>
impl<'a> Default for ConnectionCB<'a>
source§fn default() -> ConnectionCB<'a>
fn default() -> ConnectionCB<'a>
Returns the “default value” for a type. Read more
source§impl<'a, T, F> From<(&'a T, F)> for ConnectionCB<'a>
impl<'a, T, F> From<(&'a T, F)> for ConnectionCB<'a>
source§fn from(t: (&'a T, F)) -> ConnectionCB<'a>
fn from(t: (&'a T, F)) -> ConnectionCB<'a>
Converts to this type from the input type.
source§impl<'a, T, F> From<(&'a mut T, F)> for ConnectionCB<'a>
impl<'a, T, F> From<(&'a mut T, F)> for ConnectionCB<'a>
source§fn from(t: (&'a mut T, F)) -> ConnectionCB<'a>
fn from(t: (&'a mut T, F)) -> ConnectionCB<'a>
Converts to this type from the input type.
source§impl<'a> From<()> for ConnectionCB<'a>
impl<'a> From<()> for ConnectionCB<'a>
source§fn from(_: ()) -> ConnectionCB<'a>
fn from(_: ()) -> ConnectionCB<'a>
Converts to this type from the input type.
source§impl<'a, F> From<F> for ConnectionCB<'a>
impl<'a, F> From<F> for ConnectionCB<'a>
source§fn from(f: F) -> ConnectionCB<'a>
fn from(f: F) -> ConnectionCB<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ConnectionCB<'a>
impl<'a> !Send for ConnectionCB<'a>
impl<'a> !Sync for ConnectionCB<'a>
impl<'a> Unpin for ConnectionCB<'a>
impl<'a> !UnwindSafe for ConnectionCB<'a>
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