pub struct Router<O: CompressionOracle> { /* private fields */ }Expand description
In-memory CMR router.
Implementations§
Source§impl<O: CompressionOracle> Router<O>
impl<O: CompressionOracle> Router<O>
Sourcepub fn new(local_address: String, policy: RoutingPolicy, oracle: O) -> Self
pub fn new(local_address: String, policy: RoutingPolicy, oracle: O) -> Self
Creates a router instance.
Registers a pairwise shared key.
Gets known shared key.
Sourcepub fn register_pending_rsa_state(
&mut self,
peer: impl Into<String>,
n: BigUint,
d: BigUint,
)
pub fn register_pending_rsa_state( &mut self, peer: impl Into<String>, n: BigUint, d: BigUint, )
Stores pending RSA initiator state for incoming replies.
Sourcepub fn register_pending_dh_state(
&mut self,
peer: impl Into<String>,
p: BigUint,
a_secret: BigUint,
)
pub fn register_pending_dh_state( &mut self, peer: impl Into<String>, p: BigUint, a_secret: BigUint, )
Stores pending DH initiator state for incoming replies.
Sourcepub fn process_incoming(
&mut self,
raw_message: &[u8],
transport: TransportKind,
now: CmrTimestamp,
) -> ProcessOutcome
pub fn process_incoming( &mut self, raw_message: &[u8], transport: TransportKind, now: CmrTimestamp, ) -> ProcessOutcome
Processes one inbound message.
Auto Trait Implementations§
impl<O> Freeze for Router<O>where
O: Freeze,
impl<O> RefUnwindSafe for Router<O>where
O: RefUnwindSafe,
impl<O> Send for Router<O>
impl<O> Sync for Router<O>
impl<O> Unpin for Router<O>where
O: Unpin,
impl<O> UnsafeUnpin for Router<O>where
O: UnsafeUnpin,
impl<O> UnwindSafe for Router<O>where
O: UnwindSafe,
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