pub struct BindDecision { /* private fields */ }Expand description
Decision returned by ModuleHandler::on_bind.
Implementations§
Source§impl BindDecision
impl BindDecision
Sourcepub fn reject(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn reject(code: impl Into<String>, message: impl Into<String>) -> Self
Reject the route.bind request with a typed Error frame.
Sourcepub fn reject_with_detail(
code: impl Into<String>,
message: impl Into<String>,
detail: Value,
) -> Self
pub fn reject_with_detail( code: impl Into<String>, message: impl Into<String>, detail: Value, ) -> Self
Reject the route.bind request with a typed Error frame whose detail
carries the code’s machine-readable fields, such as bind_busy’s
reason and retry_after_ms. Pass a JSON object: a JSON null is
dropped on the way, since an absent detail and a null one encode the
same. The daemon relays the code, message and detail to the opener,
so the detail must never hold secrets.
Trait Implementations§
Source§impl Clone for BindDecision
impl Clone for BindDecision
Auto Trait Implementations§
impl Forget for BindDecision
impl Freeze for BindDecision
impl Move for BindDecision
impl RefUnwindSafe for BindDecision
impl Send for BindDecision
impl Sync for BindDecision
impl Unpin for BindDecision
impl UnsafeUnpin for BindDecision
impl UnwindSafe for BindDecision
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