Skip to main content

SimModeScan

Struct SimModeScan 

Source
pub struct SimModeScan(/* private fields */);
Expand description

SSCN — the simulation-mode scan field (DBF_MENU, menu(menuScan)).

The same domain as SCAN — it is the same menu — so it is the same type, and an out-of-menu index is carried, not erased. Its dbd default is the out-of-range 65535 (field(SSCN,DBF_MENU){ menu(menuScan) initial("65535") }, identical across all 21 records that carry SSCN), which C reads as “not set — keep scanning at SCAN while in simulation mode”.

That sentinel is 65535 and only 65535. Both recGbl helpers test it literally —

/* recGbl.c: recGblSaveSimm and recGblCheckSimm both open with */
if (*psscn == USHRT_MAX) return;

— so an SSCN of, say, 10 is NOT “unset”: C performs the swap, lands the illegal 10 in SCAN, and scanAdd then leaves the record in no scan list. Treating every illegal index as the sentinel would be a different behaviour from C, so the distinction is kept.

Implementations§

Source§

impl SimModeScan

Source

pub const DO_NOT_USE: u16 = 65535

C’s dbd default, and the one index the recGbl simulation helpers bail on.

Source

pub fn from_u16(v: u16) -> Self

Source

pub fn from_scan(s: ScanType) -> Self

Source

pub fn to_u16(self) -> u16

The DBR_ENUM/wire index — whatever was written, sentinel included.

Source

pub fn is_unset(self) -> bool

C’s *psscn == USHRT_MAX test.

Source

pub fn scan(self) -> Option<ScanType>

The scan SSCN swaps SCAN to. None only for the unset sentinel — an illegal-but-not-sentinel index still swaps, exactly as it does in C.

Trait Implementations§

Source§

impl Clone for SimModeScan

Source§

fn clone(&self) -> SimModeScan

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SimModeScan

Source§

impl Debug for SimModeScan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SimModeScan

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for SimModeScan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SimModeScan

Source§

impl PartialEq for SimModeScan

Source§

fn eq(&self, other: &SimModeScan) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SimModeScan

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more