pub struct World<'a> { /* private fields */ }Expand description
The HEY World service: publishing posts and keeping a list’s subscribers.
Implementations§
Source§impl<'a> World<'a>
impl<'a> World<'a>
Sourcepub async fn publish(
&self,
subject: &str,
content: &str,
) -> Result<String, Error>
pub async fn publish( &self, subject: &str, content: &str, ) -> Result<String, Error>
Writes a HEY World post by sending a message to WORLD_ADDRESS, and answers the
post’s token — the handle World::update_post and World::delete_post take.
Sourcepub async fn update_post(
&self,
token: &str,
subject: &str,
content: &str,
) -> Result<(), Error>
pub async fn update_post( &self, token: &str, subject: &str, content: &str, ) -> Result<(), Error>
Edits a published post. An empty subject or body is left off the wire, and HEY leaves what a request does not name alone.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for World<'a>
impl<'a> !UnwindSafe for World<'a>
impl<'a> Freeze for World<'a>
impl<'a> Send for World<'a>
impl<'a> Sync for World<'a>
impl<'a> Unpin for World<'a>
impl<'a> UnsafeUnpin for World<'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