Skip to main content

VoidBlock

Type Alias VoidBlock 

Source
pub type VoidBlock = RcBlock<Box<dyn Fn() + Send>>;
Expand description

Block type: void (^)(void)

Used for simple callbacks with no arguments.

Aliased Type§

pub struct VoidBlock { /* private fields */ }

Implementations§

Source§

impl VoidBlock

Source

pub fn from_fn<F>(f: F) -> Self
where F: Fn() + Send + 'static,

Create a block from a closure taking no arguments.