pub struct NetXServer<T: ICreateController + 'static> { /* private fields */ }
Expand description
NetX Service structure.
Implementations§
Source§impl<T> NetXServer<T>where
T: ICreateController + 'static,
impl<T> NetXServer<T>where
T: ICreateController + 'static,
Sourcepub async fn new(option: ServerOption, impl_controller: T) -> NetXServer<T>
pub async fn new(option: ServerOption, impl_controller: T) -> NetXServer<T>
Sourcepub fn get_token_manager(&self) -> Weak<dyn ITokenManager<T::Controller>>
pub fn get_token_manager(&self) -> Weak<dyn ITokenManager<T::Controller>>
Sourcepub async fn start(&self) -> Result<JoinHandle<Result<()>>>
pub async fn start(&self) -> Result<JoinHandle<Result<()>>>
Starts the server asynchronously.
§Returns
A Result
containing a JoinHandle
that resolves to a Result
.
Sourcepub async fn start_block(&self) -> Result<()>
pub async fn start_block(&self) -> Result<()>
Trait Implementations§
impl<T: ICreateController + 'static> Send for NetXServer<T>
Implement Send
for NetXServer
.
impl<T: ICreateController + 'static> Sync for NetXServer<T>
Implement Sync
for NetXServer
.
Auto Trait Implementations§
impl<T> Freeze for NetXServer<T>
impl<T> !RefUnwindSafe for NetXServer<T>
impl<T> Unpin for NetXServer<T>
impl<T> !UnwindSafe for NetXServer<T>
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