Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
This commit is contained in:
parent
d612bf5678
commit
01322f69a4
135 changed files with 135 additions and 1769 deletions
|
|
@ -5,7 +5,7 @@ use std::rc::Rc;
|
|||
///
|
||||
/// It can be used to route messages back to the [`Application`].
|
||||
///
|
||||
/// [`Application`]: trait.Application.html
|
||||
/// [`Application`]: crate::Application
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub struct Bus<Message> {
|
||||
publish: Rc<Box<dyn Fn(Message) -> ()>>,
|
||||
|
|
@ -33,15 +33,13 @@ where
|
|||
|
||||
/// Publishes a new message for the [`Application`].
|
||||
///
|
||||
/// [`Application`]: trait.Application.html
|
||||
/// [`Application`]: crate::Application
|
||||
pub fn publish(&self, message: Message) {
|
||||
(self.publish)(message)
|
||||
}
|
||||
|
||||
/// Creates a new [`Bus`] that applies the given function to the messages
|
||||
/// before publishing.
|
||||
///
|
||||
/// [`Bus`]: struct.Bus.html
|
||||
pub fn map<B>(&self, mapper: Rc<Box<dyn Fn(B) -> Message>>) -> Bus<B>
|
||||
where
|
||||
B: 'static,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue