pub struct GatewayServer { /* private fields */ }Expand description
Fully assembled machine gateway and its chat registry.
Implementations§
Source§impl GatewayServer
impl GatewayServer
Sourcepub async fn open(state_dir: PathBuf) -> Result<Self>
pub async fn open(state_dir: PathBuf) -> Result<Self>
Opens protected state and the machine-wide chat registry.
Sourcepub async fn bootstrap(
state_dir: PathBuf,
listen: SocketAddr,
) -> Result<(Self, PairingGrant)>
pub async fn bootstrap( state_dir: PathBuf, listen: SocketAddr, ) -> Result<(Self, PairingGrant)>
Binds and initializes a fresh local gateway before exposing its one-use pairing grant.
Sourcepub async fn serve(self) -> Result<()>
pub async fn serve(self) -> Result<()>
Serves until a process shutdown signal or 72 hours of inactivity.
Sourcepub async fn serve_until(self, shutdown: impl Future<Output = ()>) -> Result<()>
pub async fn serve_until(self, shutdown: impl Future<Output = ()>) -> Result<()>
Serves until shutdown or the same inactivity policy as Self::serve.
Sourcepub const fn listen_addr(&self) -> SocketAddr
pub const fn listen_addr(&self) -> SocketAddr
Returns the bound address from persisted configuration.
Auto Trait Implementations§
impl !Freeze for GatewayServer
impl !RefUnwindSafe for GatewayServer
impl !UnwindSafe for GatewayServer
impl Send for GatewayServer
impl Sync for GatewayServer
impl Unpin for GatewayServer
impl UnsafeUnpin for GatewayServer
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