Struct ya_sb_router::InstanceConfig
source · pub struct InstanceConfig { /* private fields */ }
Expand description
Router config with instance identification info.
Implementations§
source§impl InstanceConfig
impl InstanceConfig
sourcepub fn new(config: RouterConfig) -> Self
pub fn new(config: RouterConfig) -> Self
Default instance identification
sourcepub fn with_app(
config: RouterConfig,
name: impl Into<String>,
version: impl Into<String>
) -> Self
pub fn with_app( config: RouterConfig, name: impl Into<String>, version: impl Into<String> ) -> Self
Instance with custom application name and version.
sourcepub async fn bind_tcp<A: ToSocketAddrs + Display>(
self,
addr: A
) -> Result<impl Future<Output = ()>>
pub async fn bind_tcp<A: ToSocketAddrs + Display>( self, addr: A ) -> Result<impl Future<Output = ()>>
Starts new server instance on given tcp address.
sourcepub async fn bind_unix(
self,
path: &Path
) -> Result<impl Future<Output = ()> + 'static>
pub async fn bind_unix( self, path: &Path ) -> Result<impl Future<Output = ()> + 'static>
Starts new server instance on given unix socket path address.
Auto Trait Implementations§
impl Freeze for InstanceConfig
impl RefUnwindSafe for InstanceConfig
impl Send for InstanceConfig
impl Sync for InstanceConfig
impl Unpin for InstanceConfig
impl UnwindSafe for InstanceConfig
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