Struct ably::rest::PublishBuilder
source · pub struct PublishBuilder<'a> { /* private fields */ }
Expand description
A request to publish a message to a channel.
Implementations
sourceimpl<'a> PublishBuilder<'a>
impl<'a> PublishBuilder<'a>
sourcepub fn json(self, data: impl Serialize) -> Self
pub fn json(self, data: impl Serialize) -> Self
Set the message data to the JSON encoding of the given data.
sourcepub fn params<T: Serialize + ?Sized>(self, params: &T) -> Self
pub fn params<T: Serialize + ?Sized>(self, params: &T) -> Self
Set the params to include in the publish request.
sourcepub fn cipher(self, cipher: CipherParams) -> Self
pub fn cipher(self, cipher: CipherParams) -> Self
Set the cipher to use to encrypt the message.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for PublishBuilder<'a>
impl<'a> Send for PublishBuilder<'a>
impl<'a> Sync for PublishBuilder<'a>
impl<'a> Unpin for PublishBuilder<'a>
impl<'a> !UnwindSafe for PublishBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more