pub struct MixNode {
pub id: Vec<u8>,
/* private fields */
}Expand description
Mix network node for batch processing and traffic shaping
Fields§
§id: Vec<u8>Node identifier
Implementations§
Source§impl MixNode
impl MixNode
Sourcepub fn with_config(id: Vec<u8>, config: MixConfig) -> Self
pub fn with_config(id: Vec<u8>, config: MixConfig) -> Self
Create a new mix node with custom configuration
Sourcepub async fn add_message(
&mut self,
message: MixMessage,
) -> Result<(), OnionError>
pub async fn add_message( &mut self, message: MixMessage, ) -> Result<(), OnionError>
Add a message to the mix node buffer
Sourcepub async fn flush_batch(&mut self) -> Result<Vec<MixMessage>, OnionError>
pub async fn flush_batch(&mut self) -> Result<Vec<MixMessage>, OnionError>
Flush the current batch of messages
Sourcepub fn get_stats(&self) -> MixNodeStats
pub fn get_stats(&self) -> MixNodeStats
Get current buffer statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MixNode
impl RefUnwindSafe for MixNode
impl Send for MixNode
impl Sync for MixNode
impl Unpin for MixNode
impl UnwindSafe for MixNode
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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