pub struct Server { /* private fields */ }
Implementations§
Source§impl Server
impl Server
pub fn new(config: Config) -> Self
pub async fn run(&mut self) -> Result<()>
pub fn new_message(&self, msg_type: i32, data: Bytes) -> Message
pub async fn recv_message(&self) -> Option<Message>
pub async fn send_message( &self, message: Message, ) -> Result<(), SendError<Message>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
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