mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 09:25:01 +00:00
Also mention send_wrapper in doc for CbSink
This commit is contained in:
parent
aa74e691e1
commit
14f2c962af
@ -60,6 +60,14 @@ pub struct Cursive {
|
||||
pub type ScreenId = usize;
|
||||
|
||||
/// Convenient alias to the result of `Cursive::cb_sink`.
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Callbacks need to be `Send`, which can be limiting in some cases.
|
||||
///
|
||||
/// In some case [`send_wrapper`] may help you work around that.
|
||||
///
|
||||
/// [`send_wrapper`]: https://crates.io/crates/send_wrapper
|
||||
pub type CbSink = Sender<Box<dyn FnOnce(&mut Cursive) + Send>>;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
|
Loading…
Reference in New Issue
Block a user