pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
Sourcepub fn bind(port: u16) -> Result<Server, Box<dyn Error>>
pub fn bind(port: u16) -> Result<Server, Box<dyn Error>>
Binds 127.0.0.1 at port; 0 lets the kernel pick one.
pub fn bind_with( port: u16, open: Box<dyn Fn() -> Result<Store, Box<dyn Error>> + Send + Sync>, ) -> Result<Server, Box<dyn Error>>
pub fn port(&self) -> u16
pub fn token(&self) -> &str
Auto Trait Implementations§
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Freeze for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin 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