#[repr(i8)]pub enum CancelResponse {
Reject = 0,
Accept = 1,
}Expand description
Per-goal cancel decision returned from a server’s cancel callback.
The twin of GoalResponse for the cancel path: the user is asked about
ONE goal and answers accept or reject. It never travels on the wire — the
server turns the answer into a CancelReturnCode plus a goals_canceling
entry when it writes the CancelGoal reply.
Discriminants match C’s nros_cancel_response_t (NROS_CANCEL_REJECT = 0,
NROS_CANCEL_ACCEPT = 1) and C++’s nros::CancelResponse, so the three
surfaces agree. Reject is the default because a zeroed or unanswered
decision must not cancel a goal nobody asked to cancel.
Variants§
Reject = 0
Do not cancel this goal.
Accept = 1
Cancel this goal — it transitions to GoalStatus::Canceling.
Implementations§
Source§impl CancelResponse
impl CancelResponse
Sourcepub fn from_i8(value: i8) -> Option<CancelResponse>
pub fn from_i8(value: i8) -> Option<CancelResponse>
Convert from i8 value
Trait Implementations§
Source§impl Clone for CancelResponse
impl Clone for CancelResponse
Source§fn clone(&self) -> CancelResponse
fn clone(&self) -> CancelResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CancelResponse
Source§impl Debug for CancelResponse
impl Debug for CancelResponse
Source§impl Default for CancelResponse
impl Default for CancelResponse
Source§fn default() -> CancelResponse
fn default() -> CancelResponse
Returns the “default value” for a type. Read more
impl Eq for CancelResponse
Source§impl PartialEq for CancelResponse
impl PartialEq for CancelResponse
Source§fn eq(&self, other: &CancelResponse) -> bool
fn eq(&self, other: &CancelResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CancelResponse
Auto Trait Implementations§
impl Freeze for CancelResponse
impl RefUnwindSafe for CancelResponse
impl Send for CancelResponse
impl Sync for CancelResponse
impl Unpin for CancelResponse
impl UnsafeUnpin for CancelResponse
impl UnwindSafe for CancelResponse
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