pub struct ChoiceFlags {
pub has_condition: bool,
pub has_start_content: bool,
pub has_choice_only_content: bool,
pub once_only: bool,
pub is_invisible_default: bool,
}Expand description
Flags packed into a BeginChoice instruction.
Under the single-pop protocol, BeginChoice pops at most one display
string from the stack when has_start_content || has_choice_only_content.
The two content flags are metadata indicating which parts of the original
ink choice contributed to that string — the runtime does not pop them
separately.
Fields§
§has_condition: bool§has_start_content: boolOriginal choice had start content (text before [).
has_choice_only_content: boolOriginal choice had choice_only content (text inside []).
Under the single-pop protocol this is metadata only — no extra stack pop.
once_only: bool§is_invisible_default: boolTrait Implementations§
Source§impl Clone for ChoiceFlags
impl Clone for ChoiceFlags
Source§fn clone(&self) -> ChoiceFlags
fn clone(&self) -> ChoiceFlags
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 ChoiceFlags
Source§impl Debug for ChoiceFlags
impl Debug for ChoiceFlags
impl Eq for ChoiceFlags
Source§impl Hash for ChoiceFlags
impl Hash for ChoiceFlags
Source§impl PartialEq for ChoiceFlags
impl PartialEq for ChoiceFlags
Source§fn eq(&self, other: &ChoiceFlags) -> bool
fn eq(&self, other: &ChoiceFlags) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChoiceFlags
Auto Trait Implementations§
impl Freeze for ChoiceFlags
impl RefUnwindSafe for ChoiceFlags
impl Send for ChoiceFlags
impl Sync for ChoiceFlags
impl Unpin for ChoiceFlags
impl UnsafeUnpin for ChoiceFlags
impl UnwindSafe for ChoiceFlags
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