pub trait RequestHandlerTable {
Show 13 methods
// Required methods
fn capacity(&self) -> usize;
fn len(&self) -> usize;
fn destinations(&self) -> &[DestinationHash];
fn path_hashes(&self) -> &[RequestPathHash];
fn policies(&self) -> &[RequestPolicy];
fn push(
&mut self,
destination: DestinationHash,
path_hash: RequestPathHash,
policy: RequestPolicy,
) -> Result<(), TablePushError>;
fn remove_at(&mut self, slot: usize);
fn set_policy_at(&mut self, slot: usize, policy: RequestPolicy);
fn clear_allowed_at(&mut self, slot: usize);
fn allowed_contains_at(&self, slot: usize, identity: &IdentityHash) -> bool;
fn allow_at(
&mut self,
slot: usize,
identity: IdentityHash,
) -> Result<(), TablePushError>;
fn disallow_at(&mut self, slot: usize, identity: &IdentityHash);
// Provided method
fn is_empty(&self) -> bool { ... }
}Required Methods§
fn capacity(&self) -> usize
fn len(&self) -> usize
fn destinations(&self) -> &[DestinationHash]
fn path_hashes(&self) -> &[RequestPathHash]
fn policies(&self) -> &[RequestPolicy]
Sourcefn push(
&mut self,
destination: DestinationHash,
path_hash: RequestPathHash,
policy: RequestPolicy,
) -> Result<(), TablePushError>
fn push( &mut self, destination: DestinationHash, path_hash: RequestPathHash, policy: RequestPolicy, ) -> Result<(), TablePushError>
Insert a fresh handler row with an empty allow list. The wrapper owns upsert semantics and never pushes a duplicate key.
fn remove_at(&mut self, slot: usize)
fn set_policy_at(&mut self, slot: usize, policy: RequestPolicy)
fn clear_allowed_at(&mut self, slot: usize)
fn allowed_contains_at(&self, slot: usize, identity: &IdentityHash) -> bool
fn allow_at( &mut self, slot: usize, identity: IdentityHash, ) -> Result<(), TablePushError>
fn disallow_at(&mut self, slot: usize, identity: &IdentityHash)
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".