pub struct HyphaeServer { /* private fields */ }Expand description
Opened optional HTTP surface owning exactly one embedded Hyphae engine.
Implementations§
Source§impl HyphaeServer
impl HyphaeServer
Sourcepub fn open(config: ServerConfig) -> Result<Self, ServerError>
pub fn open(config: ServerConfig) -> Result<Self, ServerError>
Validates secure defaults and opens the exclusively owned engine.
No socket is opened by this method. In particular, a non-loopback bind
without authentication fails here before Self::bind.
§Errors
Returns a configuration, data-directory lock, recovery, or corruption error.
Sourcepub async fn bind(self) -> Result<BoundServer, ServerError>
pub async fn bind(self) -> Result<BoundServer, ServerError>
Opens the configured TCP listener and prepares graceful serving.
§Errors
Returns an operating-system socket bind failure.
Auto Trait Implementations§
impl Freeze for HyphaeServer
impl RefUnwindSafe for HyphaeServer
impl Send for HyphaeServer
impl Sync for HyphaeServer
impl Unpin for HyphaeServer
impl UnsafeUnpin for HyphaeServer
impl UnwindSafe for HyphaeServer
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