pub struct NetAdapter { /* private fields */ }Expand description
Net adapter for high-performance UDP transport.
Implementations§
Source§impl NetAdapter
impl NetAdapter
Sourcepub fn new(config: NetAdapterConfig) -> Result<Self, AdapterError>
pub fn new(config: NetAdapterConfig) -> Result<Self, AdapterError>
Create a new Net adapter.
Trait Implementations§
Source§impl Adapter for NetAdapter
impl Adapter for NetAdapter
Source§fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the adapter. Read more
Source§fn on_batch<'life0, 'async_trait>(
&'life0 self,
batch: Arc<Batch>,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_batch<'life0, 'async_trait>(
&'life0 self,
batch: Arc<Batch>,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a batch of events. Read more
Source§fn poll_shard<'life0, 'life1, 'async_trait>(
&'life0 self,
shard_id: u16,
from_id: Option<&'life1 str>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<ShardPollResult, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn poll_shard<'life0, 'life1, 'async_trait>(
&'life0 self,
shard_id: u16,
from_id: Option<&'life1 str>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<ShardPollResult, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Poll events from a single shard. Read more
Source§fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Force flush any buffered data. Read more
Auto Trait Implementations§
impl !Freeze for NetAdapter
impl !RefUnwindSafe for NetAdapter
impl !UnwindSafe for NetAdapter
impl Send for NetAdapter
impl Sync for NetAdapter
impl Unpin for NetAdapter
impl UnsafeUnpin for NetAdapter
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