pub enum PreparedMsg {
Text(String),
Binary(Bytes),
}Expand description
Prepared message cached for broadcasting (serialize once, send N times).
Variants§
Implementations§
Source§impl PreparedMsg
impl PreparedMsg
pub fn prepare(out: &Outgoing) -> Result<PreparedMsg, WsPrismError>
Sourcepub fn to_ws_message(&self) -> Message
pub fn to_ws_message(&self) -> Message
Convert to axum::ws::Message for transport.
NOTE: axum::Message::Binary requires Vec<u8>, so Binary path clones into Vec.
Trait Implementations§
Source§impl Clone for PreparedMsg
impl Clone for PreparedMsg
Source§fn clone(&self) -> PreparedMsg
fn clone(&self) -> PreparedMsg
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for PreparedMsg
impl RefUnwindSafe for PreparedMsg
impl Send for PreparedMsg
impl Sync for PreparedMsg
impl Unpin for PreparedMsg
impl UnwindSafe for PreparedMsg
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