Struct GateChoice
pub struct GateChoice {
pub id: String,
pub label: String,
pub emphasis: GateChoiceEmphasis,
pub input: Option<GateChoiceInput>,
}Expand description
One selectable choice on a ChannelGatePrompt.
Fields§
§id: StringStable machine id carried back in the answer (e.g. “approve”). Mint it
from GateChoiceKind::id so it stays in lockstep with the parser.
label: StringHuman label for the button / keyboard entry.
emphasis: GateChoiceEmphasisVisual emphasis hint for channels that support it.
input: Option<GateChoiceInput>When set, this choice collects free text from the operator before it is answered (e.g. “Edit” amends a draft, “Revise” sends guidance). Channels with a native form (Discord modal) render one; channels without simply omit the choice — plain approve/deny stays universally answerable.
Trait Implementations§
Source§impl Clone for GateChoice
impl Clone for GateChoice
Source§fn clone(&self) -> GateChoice
fn clone(&self) -> GateChoice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GateChoice
impl Debug for GateChoice
Source§impl<'de> Deserialize<'de> for GateChoice
impl<'de> Deserialize<'de> for GateChoice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GateChoice
impl RefUnwindSafe for GateChoice
impl Send for GateChoice
impl Sync for GateChoice
impl Unpin for GateChoice
impl UnsafeUnpin for GateChoice
impl UnwindSafe for GateChoice
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