pub struct Server { /* private fields */ }
Implementations§
Source§impl Server
impl Server
pub fn new() -> Server
pub fn register_value<K, T>(&mut self, name: K, handler: T)
pub fn register<'a, K, Treq, Tres, Thandler, Tef, Tdf>( &mut self, name: K, handler: Thandler, encode_fail: Tef, decode_fail: Tdf, )
pub fn register_simple<'a, K, Treq, Tres, Thandler>( &mut self, name: K, handler: Thandler, )
pub fn set_on_missing<T>(&mut self, handler: T)
pub fn bind( self, uri: &SocketAddr, ) -> Result<BoundServer<impl Fn(&Request) -> Response + Send + Sync + 'static>>
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