pub struct DuplexGate { /* private fields */ }Expand description
The gate over duplex calls: a Gate (and its grants generation, which
says when to ask it again), the audit, and the clock expiry is read by.
Implementations§
Source§impl DuplexGate
impl DuplexGate
Sourcepub fn new(gate: Gate) -> Self
pub fn new(gate: Gate) -> Self
The gate over duplex calls in front of gate; re-verifies when
gate’s generation (Gate::generation) moves.
Sourcepub fn with_audit(self, audit: AuditQueue) -> Self
pub fn with_audit(self, audit: AuditQueue) -> Self
Every typed refusal to audit (one record each, never waiting).
Sourcepub fn with_clock(self, clock: Clock) -> Self
pub fn with_clock(self, clock: Clock) -> Self
When a sign-in expires is read by clock (unix seconds; a test’s).
Sourcepub fn gate(&self) -> &Gate
pub fn gate(&self) -> &Gate
The grant gate it asks (its Gate::generation, Gate::moved).
Sourcepub fn gate_checks(&self) -> u64
pub fn gate_checks(&self) -> u64
How many times the gate has been asked through this one.
Sourcepub fn open(
&self,
at: impl Into<CallRef>,
calls: &dyn CallCounter,
caller: Option<Arc<AuthContext>>,
grant: &str,
target: Option<&str>,
ceiling: CallCeiling,
answer_by: Answerer,
) -> Result<DuplexCall, DuplexRefusal>
pub fn open( &self, at: impl Into<CallRef>, calls: &dyn CallCounter, caller: Option<Arc<AuthContext>>, grant: &str, target: Option<&str>, ceiling: CallCeiling, answer_by: Answerer, ) -> Result<DuplexCall, DuplexRefusal>
Open a duplex call: the gate first (a refusal takes no place), then
the call’s place on its connection. at is the call — its
connection and subscription (a ConnId alone is subscription 0).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DuplexGate
impl !UnwindSafe for DuplexGate
impl Freeze for DuplexGate
impl Send for DuplexGate
impl Sync for DuplexGate
impl Unpin for DuplexGate
impl UnsafeUnpin for DuplexGate
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