pub enum EngineWrapper {
StandardUncompressed(Arc<StandardEngine<UncompressedTree>>),
ConcurrentUncompressed(Arc<ShardedEngine<UncompressedTree>>),
StandardCompressed(Arc<StandardEngine<CompressedTree>>),
ConcurrentCompressed(Arc<ShardedEngine<CompressedTree>>),
StandardART(Arc<ARTEngineAdapter>),
ConcurrentART(Arc<ShardedARTEngineAdapter>),
}Variants§
StandardUncompressed(Arc<StandardEngine<UncompressedTree>>)
ConcurrentUncompressed(Arc<ShardedEngine<UncompressedTree>>)
StandardCompressed(Arc<StandardEngine<CompressedTree>>)
ConcurrentCompressed(Arc<ShardedEngine<CompressedTree>>)
StandardART(Arc<ARTEngineAdapter>)
ConcurrentART(Arc<ShardedARTEngineAdapter>)
Implementations§
Source§impl EngineWrapper
impl EngineWrapper
Sourcepub fn new(
variant: EngineVariant,
node_variant: NodeVariant,
compressed: bool,
num_shards: Option<usize>,
) -> Self
pub fn new( variant: EngineVariant, node_variant: NodeVariant, compressed: bool, num_shards: Option<usize>, ) -> Self
num_shards:
None -> auto-detect from CPU cores + available memory
Some(1) -> standard (unsharded)
Some(n>1) -> sharded with exactly n shards
Trait Implementations§
Source§impl Clone for EngineWrapper
impl Clone for EngineWrapper
Source§impl RadixEngine for EngineWrapper
impl RadixEngine for EngineWrapper
fn insert(&self, prefix: IpNetwork, metadata: Metadata) -> Result<(), String>
fn lookup(&self, ip: &IpAddr) -> Option<Metadata>
fn remove(&self, prefix: &IpNetwork) -> Option<Metadata>
fn contains(&self, prefix: &IpNetwork) -> bool
fn clear(&self)
fn size(&self) -> usize
fn stats(&self) -> EngineStats
Auto Trait Implementations§
impl !RefUnwindSafe for EngineWrapper
impl !UnwindSafe for EngineWrapper
impl Forget for EngineWrapper
impl Freeze for EngineWrapper
impl Move for EngineWrapper
impl Send for EngineWrapper
impl Sync for EngineWrapper
impl Unpin for EngineWrapper
impl UnsafeUnpin for EngineWrapper
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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