pub struct SimTransport { /* private fields */ }Expand description
In-memory SyncTransport. Routes a SyncRequest straight to the target
peer’s SyncHandler through the shared SimNetwork — no sockets, no
serialization — and honors the network’s partition state.
Trait Implementations§
Source§impl SyncTransport for SimTransport
impl SyncTransport for SimTransport
Source§fn transport_type(&self) -> &'static str
fn transport_type(&self) -> &'static str
Get the transport type identifier. Read more
Source§fn can_handle_address(&self, address: &Address) -> bool
fn can_handle_address(&self, address: &Address) -> bool
Check if this transport can handle the given address Read more
Source§fn start_server<'life0, 'async_trait>(
&'life0 mut self,
handler: Arc<dyn SyncHandler>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_server<'life0, 'async_trait>(
&'life0 mut self,
handler: Arc<dyn SyncHandler>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start a server with the pre-configured bind address. Read more
Source§fn stop_server<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_server<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the running server gracefully. Read more
Source§fn send_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
request: &'life2 SyncRequest,
) -> Pin<Box<dyn Future<Output = Result<SyncResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
request: &'life2 SyncRequest,
) -> Pin<Box<dyn Future<Output = Result<SyncResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send a sync request to a peer and receive a response. Read more
Source§fn is_server_running(&self) -> bool
fn is_server_running(&self) -> bool
Check if the server is currently running. Read more
Source§fn get_server_address(&self) -> Result<String>
fn get_server_address(&self) -> Result<String>
Get the address the server is currently bound to. Read more
Source§fn send_entries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
entries: &'life2 [Entry],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_entries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
entries: &'life2 [Entry],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send entries to a sync peer and ensure they are acknowledged. Read more
Auto Trait Implementations§
impl Freeze for SimTransport
impl RefUnwindSafe for SimTransport
impl Send for SimTransport
impl Sync for SimTransport
impl Unpin for SimTransport
impl UnsafeUnpin for SimTransport
impl UnwindSafe for SimTransport
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more