pub struct E2ERegistry { /* private fields */ }Expand description
Registry mapping message keys to E2E profile configurations and state.
Implementations§
Source§impl E2ERegistry
impl E2ERegistry
Sourcepub fn register(&mut self, key: E2EKey, profile: E2EProfile)
pub fn register(&mut self, key: E2EKey, profile: E2EProfile)
Register an E2E profile for the given key, creating fresh state.
Sourcepub fn unregister(&mut self, key: &E2EKey)
pub fn unregister(&mut self, key: &E2EKey)
Remove E2E configuration for the given key.
Sourcepub fn contains_key(&self, key: &E2EKey) -> bool
pub fn contains_key(&self, key: &E2EKey) -> bool
Returns true if a profile is registered for key.
Sourcepub fn check<'a>(
&mut self,
key: E2EKey,
payload: &'a [u8],
upper_header: [u8; 8],
) -> Option<(E2ECheckStatus, &'a [u8])>
pub fn check<'a>( &mut self, key: E2EKey, payload: &'a [u8], upper_header: [u8; 8], ) -> Option<(E2ECheckStatus, &'a [u8])>
Run E2E check for key if configured.
Returns None if no profile is registered for key.
Otherwise returns the check status and the best available payload
(stripped E2E header on success, original bytes on check failure).
Trait Implementations§
Source§impl Debug for E2ERegistry
impl Debug for E2ERegistry
Auto Trait Implementations§
impl Freeze for E2ERegistry
impl RefUnwindSafe for E2ERegistry
impl Send for E2ERegistry
impl Sync for E2ERegistry
impl Unpin for E2ERegistry
impl UnsafeUnpin for E2ERegistry
impl UnwindSafe for E2ERegistry
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