pub struct Gateway { /* private fields */ }Expand description
A bound gateway, ready to serve.
Built before it runs so a composition binary can create its shards - and a test can learn the port the operating system picked - between binding and serving.
Implementations§
Source§impl Gateway
impl Gateway
Sourcepub async fn bind(config: GatewayConfig, identity: Identity) -> Result<Gateway>
pub async fn bind(config: GatewayConfig, identity: Identity) -> Result<Gateway>
Bind both planes and start the runtime.
§Errors
When either socket cannot be bound, or the TLS identity is unusable.
Sourcepub fn address(&self) -> SocketAddr
pub fn address(&self) -> SocketAddr
The address both planes ended up on.
pub fn runtime(&self) -> RuntimeHandle
pub fn voice_metrics(&self) -> Arc<VoiceMetrics>
Auto Trait Implementations§
impl !Freeze for Gateway
impl !RefUnwindSafe for Gateway
impl Send for Gateway
impl Sync for Gateway
impl Unpin for Gateway
impl !UnwindSafe for Gateway
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