Struct netxclient::Actor[][src]

pub struct Actor<I> { /* fields omitted */ }

Implementations

impl<I> Actor<I> where
    I: 'static, 
[src]

pub fn new(x: I) -> Actor<I>[src]

pub async fn inner_call<T, S>(
    &'_ self,
    call: impl FnOnce(Arc<InnerStore<I>>) -> T
) -> Result<S, Error> where
    T: Future<Output = Result<S, Error>> + Send + 'static,
    S: 'static + Sync + Send
[src]

pub unsafe fn deref_inner(&self) -> RefInner<'_, I>[src]

Trait Implementations

impl<T: SessionSave + 'static> INetXClient<T> for Actor<NetXClient<T>>[src]

fn init<'life0, 'async_trait, C: IController + Sync + Send + 'static>(
    &'life0 self,
    controller: C
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    C: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn connect_network<'life0, 'async_trait>(
    self: &'life0 Arc<Self>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn get_address(&self) -> String[src]

fn get_serviceinfo(&self) -> ServerOption[src]

fn get_sessionid(&self) -> i64[src]

fn get_mode(&self) -> u8[src]

fn new_serial(&self) -> i64[src]

fn is_connect(&self) -> bool[src]

fn get_peer<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<Actor<TcpClient>>>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn store_sessionid<'life0, 'async_trait>(
    &'life0 self,
    sessionid: i64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn set_mode<'life0, 'async_trait>(
    &'life0 self,
    mode: u8
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn set_network_client<'life0, 'async_trait>(
    &'life0 self,
    client: Arc<Actor<TcpClient>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn reset_connect_stats<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn get_callback_len<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn set_result<'life0, 'async_trait>(
    &'life0 self,
    serial: i64,
    data: Data
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn set_error<'life0, 'async_trait>(
    &'life0 self,
    serial: i64,
    err: Error
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn set_request_manager<'life0, 'async_trait>(
    &'life0 self,
    request: Arc<Actor<RequestManager<T>>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn call_special_function<'life0, 'async_trait>(
    &'life0 self,
    cmd: i32
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn call_controller<'life0, 'async_trait>(
    &'life0 self,
    tt: u8,
    cmd: i32,
    data: Data
) -> Pin<Box<dyn Future<Output = RetResult> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn close<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn call<'life0, 'async_trait>(
    &'life0 self,
    serial: i64,
    buff: Data
) -> Pin<Box<dyn Future<Output = Result<RetResult>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn run<'life0, 'async_trait>(
    &'life0 self,
    buff: Data
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

impl SocketClientTrait for Actor<TcpClient>[src]

pub fn send<'life0, 'async_trait, T>(
    &'life0 self,
    buff: T
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + 'async_trait + Send, Global>> where
    'life0: 'async_trait,
    T: 'static + Deref<Target = [u8]> + Send + Sync + 'async_trait,
    Actor<TcpClient>: 'async_trait, 
[src]

pub fn disconnect<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>> where
    'life0: 'async_trait,
    Actor<TcpClient>: 'async_trait, 
[src]

Auto Trait Implementations

impl<I> !Dummy for Actor<I>

impl<I> !RefUnwindSafe for Actor<I>

impl<I> Send for Actor<I>

impl<I> Sync for Actor<I>

impl<I> Unpin for Actor<I>

impl<I> !UnwindSafe for Actor<I>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.