Skip to main content

LookupHit

Enum LookupHit 

Source
pub enum LookupHit {
    Function {
        spelling: String,
        function_kind: LookupFunctionKind,
        receiver: Option<ReceiverCategory>,
        unbounded: bool,
        params: Vec<LookupParam>,
        catalog_id: Option<String>,
        display_name: Option<String>,
        matched_on: MatchKind,
    },
    EnumDomain {
        domain: String,
        members: Option<Vec<EnumMemberEntry>>,
        display_name: Option<String>,
        matched_on: MatchKind,
    },
    EnumMember {
        spelling: String,
        domain: String,
        member: String,
        display_name: Option<String>,
        aliases: Vec<String>,
        matched_on: MatchKind,
    },
    Setting {
        path: String,
        display_name: Option<String>,
        value: SettingValueForm,
        matched_on: MatchKind,
    },
    Parameter {
        callable: String,
        param: LookupParam,
        matched_on: MatchKind,
    },
    SettingPath {
        path: String,
        matched_on: MatchKind,
    },
}
Expand description

One lookup hit.

Variants§

§

Function

A callable.

Fields

§spelling: String

The OPY call spelling (member calls carry their member name).

§function_kind: LookupFunctionKind

Whether the callable is an action, a value, or a member call.

§receiver: Option<ReceiverCategory>

The declared receiver category of a member call — how it is invoked (eventPlayer.setMoveSpeed(…) takes a Player receiver). None for standalone calls.

§unbounded: bool

Whether the argument count is unbounded (.format placeholders).

§params: Vec<LookupParam>

The parameters in call order: the owner facts Wright renders into a signature string.

§catalog_id: Option<String>

The canonical catalog id the callable emits, when linked.

§display_name: Option<String>

The English display name the catalog records, when linked.

§matched_on: MatchKind

Which spelling form matched.

§

EnumDomain

A callable enum domain.

Fields

§domain: String

The OPY domain spelling (Domain.MEMBER head).

§members: Option<Vec<EnumMemberEntry>>

The members the domain accepts, or None when the domain is manifest-only/contextual and carries no standalone member list.

§display_name: Option<String>

The English display name the catalog records, when linked.

§matched_on: MatchKind

Which spelling form matched.

§

EnumMember

One enum member.

Fields

§spelling: String

The OPY spelling (Hero.SOLDIER).

§domain: String

The domain it belongs to.

§member: String

The canonical catalog member id it lowers to.

§display_name: Option<String>

The English display name, when the catalog provides one.

§aliases: Vec<String>

The other source spellings the member accepts.

§matched_on: MatchKind

Which spelling form matched.

§

Setting

A settings key.

Fields

§path: String

The effective settings path; per-team/per-hero slots stay templated as heroes.<team>.<hero>.<key>.

§display_name: Option<String>

The English display name.

§value: SettingValueForm

The accepted value form.

§matched_on: MatchKind

Which spelling form matched.

§

Parameter

One parameter of a callable, listed inside a LookupWithin::Callable scope.

Fields

§callable: String

The callable’s OPY spelling.

§param: LookupParam

The parameter facts.

§matched_on: MatchKind

Which spelling form matched.

§

SettingPath

An intermediate settings path segment, listed inside a LookupWithin::Settings scope. It names a scope, not a key.

Fields

§path: String

The settings path this node represents.

§matched_on: MatchKind

Which spelling form matched.

Trait Implementations§

Source§

impl Clone for LookupHit

Source§

fn clone(&self) -> Self

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 Debug for LookupHit

Source§

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

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

impl PartialEq for LookupHit

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for LookupHit

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for LookupHit

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
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, 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.