Fix documentation

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/5/head
trivernis 3 years ago
parent 49f14d5551
commit 4e16c237db
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -38,7 +38,7 @@ use typemap_rev::{TypeMap, TypeMapKey};
/// Ok(())
/// }))
/// .build()
/// /// add context shared data
/// // add context shared data
/// .insert::<CustomKey>("Hello World".to_string())
/// // can also be build_client which would return an emitter for events
/// .build_server().await.unwrap();

@ -57,7 +57,7 @@
//! // access data
//! let mut data = ctx.data.write().await;
//! let mut my_key = data.get_mut::<MyKey>().unwrap();
//! my_key += 1;
//! *my_key += 1;
//! }
//! ctx.emitter.emit_response_to(event.id(), "mainspace-client", "something", ()).await?;
//! Ok(())

Loading…
Cancel
Save