pub struct CmdArgType {
pub optional: bool,
pub opt_labels: Vec<(String, MonoType)>,
pub ty: MonoType,
}Expand description
One command argument type: ty for a mandatory argument, or ty? for
an optional one (v0.0.6: MandatoryArgumentType / OptionalArgumentType,
types.cppo.ml:326-328). optional/opt_labels are version-discriminated
by construction: under V0_0
(positional model) optional marks a whole-slot ty? optional and
opt_labels is always empty; under V0_1 (labeled model, upstream
CommandArgType of typ LabelMap.t * typ, types.cppo.ml:214) optional
is always false and opt_labels carries this slot’s ?(l:τ,…) bundle —
a CLOSED map (no row variable: upstream discards one if written,
parser.mly:866’s TODO (error)). Kept sorted by label at every
producer (command_scheme’s harvest, lower_type_atom’s sig lowering) so
unify/Display/sealing are order-insensitive — see unify_cmd_args’s
zip-equal equal-domain test.
Fields§
§optional: bool§opt_labels: Vec<(String, MonoType)>§ty: MonoTypeTrait Implementations§
Source§impl Clone for CmdArgType
impl Clone for CmdArgType
Source§fn clone(&self) -> CmdArgType
fn clone(&self) -> CmdArgType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CmdArgType
impl !Send for CmdArgType
impl !Sync for CmdArgType
impl !UnwindSafe for CmdArgType
impl Freeze for CmdArgType
impl Unpin for CmdArgType
impl UnsafeUnpin for CmdArgType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more