pub enum DuplexRefusal {
Gate(PlexusError),
TooManyCalls {
max: usize,
},
NotThisCall,
PastCredit {
seq: u64,
credit: u64,
},
TooMuchInput {
limit: &'static str,
max: u64,
},
PersonRequired,
InputClosed,
}Expand description
Why the gate refused a duplex call, a frame or an answer — each typed on
the wire as an error item with its error_kind.
Variants§
Gate(PlexusError)
The grant gate’s own refusal (forbidden, unauthenticated).
TooManyCalls
NotThisCall
PastCredit
TooMuchInput
PersonRequired
InputClosed
The input half is already closed (a frame after the end).
Implementations§
Source§impl DuplexRefusal
impl DuplexRefusal
Sourcepub fn code(&self) -> DuplexRefusalCode
pub fn code(&self) -> DuplexRefusalCode
The refusal’s code: its audit reason (a gate refusal other than
unauthenticated is forbidden).
Sourcepub fn ends_input(&self) -> bool
pub fn ends_input(&self) -> bool
Whether it ends the call’s input half (else it refuses one frame or one answer to its sender, and the call runs on).
Sourcepub fn into_plexus(self) -> Option<PlexusError>
pub fn into_plexus(self) -> Option<PlexusError>
The gate’s own refusal, when it is one.
Trait Implementations§
Source§impl Clone for DuplexRefusal
impl Clone for DuplexRefusal
Auto Trait Implementations§
impl Freeze for DuplexRefusal
impl RefUnwindSafe for DuplexRefusal
impl Send for DuplexRefusal
impl Sync for DuplexRefusal
impl Unpin for DuplexRefusal
impl UnsafeUnpin for DuplexRefusal
impl UnwindSafe for DuplexRefusal
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