Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Snapshot · Oct 24, 2026 · Frozen documentation

Members

Borrows one retained attribute target from a published generation.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.reflection

import std.reflection;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

AttributeSiteInfo

pub final class AttributeSiteInfo

Borrows one retained attribute target from a published generation.

Identity is the dense site ordinal in that generation. Owner links remain available even when an owner has no effective attributes of its own.

pub Kind: AttributeTarget

pub Kind: AttributeTarget

Returns the semantic target category. Return: AttributeTarget case.

pub Identity: usize

pub Identity: usize

Returns the generation-local site ordinal. Return: Dense identity.

pub Name: str?

pub Name: str?

Borrows the authored target name, if present. Return: Name or none.

pub Position: usize?

pub Position: usize?

Returns a parameter-like source position, if present. Return: Position or none.

Owner

pub readonly fn Owner() -> AttributeSiteInfo?

Follows the target's lexical owner. Return: Owner or none at the root.

AttributeCount

pub readonly fn AttributeCount() -> usize

Counts attributes directly authored on this site. Return: Direct count.

AttributeAt

pub readonly fn AttributeAt(Index: usize) -> AttributeInfo?

Selects one direct retained attribute. Index: Zero-based index. Return: Attribute or none.

EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts attributes after inheritance policy. Return: Effective count.

EffectiveAttributeAt

pub readonly fn EffectiveAttributeAt(Index: usize) -> AttributeInfo?

Selects one effective retained attribute. Index: Zero-based index. Return: Attribute or none.

Attributes

pub readonly fn Attributes() -> SiteAttributeView

Enumerates attributes authored at this site. Return: Independent nonowning view.

EffectiveAttributes

pub readonly fn EffectiveAttributes() -> SiteEffectiveAttributeView

Enumerates attributes effective at this site. Return: Independent nonowning view.

AttributesOf

pub readonly fn AttributesOf<A>() -> SiteFilteredAttributeView<A>

Enumerates direct attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

EffectiveAttributesOf

pub readonly fn EffectiveAttributesOf<A>() -> SiteEffectiveFilteredAttributeView<A>

Enumerates effective attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

HasAttribute

pub readonly fn HasAttribute<A>() -> bool

Tests an exact direct attribute type. A: Attribute selector. Return: True when directly attached.

FirstAttribute

pub readonly fn FirstAttribute<A>() -> FrozenAttribute<A>?

Finds the first direct final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

FirstEffectiveAttribute

pub readonly fn FirstEffectiveAttribute<A>() -> FrozenAttribute<A>?

Finds the first effective final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

HasEffectiveAttribute

pub readonly fn HasEffectiveAttribute<A>() -> bool

Tests an exact effective attribute type. A: Attribute selector. Return: True when effective here.

AttributeInfo

pub final class AttributeInfo

References one immutable reflected attribute instance.

The Copyable descriptor borrows compiler-emitted metadata and never boxes or owns an argument value.

pub AttributeType: TypeInfo

pub AttributeType: TypeInfo

Returns the attribute's exact nominal type. Return: Descriptor handle.

pub ArgumentCount: usize

pub ArgumentCount: usize

Returns immutable argument count. Return: Ordered argument count.

ArgumentAt

pub readonly fn ArgumentAt(Index: usize) -> ValueRef?

Borrows one erased immutable argument. Index: Zero-based index. Return: ValueRef or none.

FrozenValueRef

pub readonly fn FrozenValueRef() -> ValueRef?

Borrows the final immutable attribute value. Return: Readonly ValueRef or none when no final root was retained.

TryValue

pub readonly fn TryValue<A>() -> FrozenAttribute<A>?

Selects this exact retained attribute as an immutable typed view. A: Exact attribute type. Return: Frozen view or none for a type mismatch or absent final value.

FrozenAttribute

pub final class FrozenAttribute<A>

Borrows one compiler-authenticated final attribute value.

This Copyable view retains no generation and never constructs a runtime A. Its image and record remain valid only while the publishing generation lives. The payload remains immutable and is never copied into a runtime A.

Example

module example.frozen_attribute;
from std.reflection import TypeOf;
attribute Label { pub Code: i32; init(Code: i32) { this.Code = Code; } }
[Label(42)] struct Tagged {}
pub fn Main() -> i32 {
    let Attribute = switch TypeOf<Tagged>().AttributeAt(0) {
        case .Some { Value = Found } => break Found;
        case .None => return 1;
    };
    if !(Attribute.TryValue<Label>() is .Some { Value = _ }) { return 2; }
    if TypeOf<Tagged>().FirstAttribute<Label>() is .Some { Value = _ } {
        return 42;
    }
    return 1;
}

ParameterInfo

pub final class ParameterInfo

References immutable metadata for one declared callable parameter.

pub Name: str

pub Name: str

Borrows source parameter name. Return: Registered UTF-8.

pub Type: TypeInfo

pub Type: TypeInfo

Returns exact parameter type. Return: Type descriptor.

pub Mode: ParameterMode

pub Mode: ParameterMode

Returns declared passing mode. Return: ParameterMode.

pub Position: usize

pub Position: usize

Returns zero-based declared position. Return: Stable index.

pub AttributeCount: usize

pub AttributeCount: usize

Returns attached attribute count. Return: Deterministic count.

AttributeAt

pub readonly fn AttributeAt(Index: usize) -> AttributeInfo?

Selects one attached attribute. Index: Zero-based index. Return: Descriptor or none.

AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

Returns this parameter's canonical emitted site. Return: Site or none.

EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained parameter attributes. Return: Effective count.

EffectiveAttributeAt

pub readonly fn EffectiveAttributeAt(Index: usize) -> AttributeInfo?

Selects an effective parameter attribute. Index: Zero-based index. Return: Attribute or none.

Attributes

pub readonly fn Attributes() -> ParameterAttributeView

Enumerates direct parameter attributes. Return: Fresh nonowning view.

EffectiveAttributes

pub readonly fn EffectiveAttributes() -> ParameterEffectiveAttributeView

Enumerates effective attributes in published order. Return: Independent nonowning view.

AttributesOf

pub readonly fn AttributesOf<A>() -> ParameterFilteredAttributeView<A>

Enumerates direct attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

EffectiveAttributesOf

pub readonly fn EffectiveAttributesOf<A>() -> ParameterEffectiveFilteredAttributeView<A>

Enumerates effective attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

FirstAttribute

pub readonly fn FirstAttribute<A>() -> FrozenAttribute<A>?

Finds the first direct final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

FirstEffectiveAttribute

pub readonly fn FirstEffectiveAttribute<A>() -> FrozenAttribute<A>?

Finds the first effective final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

HasEffectiveAttribute

pub readonly fn HasEffectiveAttribute<A>() -> bool

Tests one exact effective attribute type. A: Attribute selector. Return: True when effective.

HasAttribute

pub readonly fn HasAttribute<A>() -> bool

Tests one exact direct parameter attribute. A: Attribute selector. Return: True when attached.

FieldInfo

pub final class FieldInfo

References immutable metadata for one reflected field.

pub Name: str

pub Name: str

Borrows field name. Return: Registered UTF-8.

pub DeclaringType: TypeInfo

pub DeclaringType: TypeInfo

Returns declaring nominal type. Return: Type descriptor.

pub ValueType: TypeInfo

pub ValueType: TypeInfo

Returns exact stored value type. Return: Type descriptor.

pub Visibility: Visibility

pub Visibility: Visibility

Returns authored visibility. Return: Visibility value.

pub IsStatic: bool

pub IsStatic: bool

Reports static storage. Return: True for no instance field.

pub IsMutable: bool

pub IsMutable: bool

Reports writable field access. Return: Declared mutability.

pub IsCompilerGenerated: bool

pub IsCompilerGenerated: bool

Reports compiler-generated origin. Return: True for synthesized fields.

pub AutoProperty: PropertyInfo?

pub AutoProperty: PropertyInfo?

Returns owning auto-property when applicable. Return: Property descriptor or none.

pub AttributeCount: usize

pub AttributeCount: usize

Returns attached attribute count. Return: Deterministic count.

AttributeAt

pub readonly fn AttributeAt(Index: usize) -> AttributeInfo?

Selects one attached attribute. Index: Zero-based index. Return: Descriptor or none.

AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

Returns this field's canonical emitted site. Return: Site or none.

EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained field attributes. Return: Effective count.

EffectiveAttributeAt

pub readonly fn EffectiveAttributeAt(Index: usize) -> AttributeInfo?

Selects an effective field attribute. Index: Zero-based index. Return: Attribute or none.

Attributes

pub readonly fn Attributes() -> FieldAttributeView

Enumerates direct field attributes. Return: Fresh nonowning view.

EffectiveAttributes

pub readonly fn EffectiveAttributes() -> FieldEffectiveAttributeView

Enumerates effective attributes in published order. Return: Independent nonowning view.

AttributesOf

pub readonly fn AttributesOf<A>() -> FieldFilteredAttributeView<A>

Enumerates direct attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

EffectiveAttributesOf

pub readonly fn EffectiveAttributesOf<A>() -> FieldEffectiveFilteredAttributeView<A>

Enumerates effective attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

Read

pub readonly fn Read<T, I>(Object: readonly I&) -> Result<T, InvocationStatus>
        where T: Copyable

Copies a field into compiler-owned result storage after checked validation. T: Exact Copyable field type. I: Receiver type. Object: Live receiver reference. Return: Copied value or validation status.

Read

pub readonly fn Read<T, I>(Object: readonly I&, Access: PrivateAccess) -> Result<T, InvocationStatus>
        where T: Copyable

Copies a field with explicit private-access policy after checked validation. T: Exact Copyable field type. I: Receiver type. Object: Live receiver reference. Access: Private-access policy. Return: Copied value or validation status.

Read

pub readonly fn Read<T, I>(Object: mut I&) -> Result<T, InvocationStatus>
        where T: Copyable

Copies a field from a writable receiver while retaining its access mode. T: Exact Copyable field type. I: Receiver type. Object: Live writable receiver. Return: Copied value or validation status.

Read

pub readonly fn Read<T, I>(Object: mut I&, Access: PrivateAccess) -> Result<T, InvocationStatus>
        where T: Copyable

Copies a field from a writable receiver with explicit private-access policy. T: Exact Copyable field type. I: Receiver type. Object: Live writable receiver. Access: Private-access policy. Return: Copied value or validation status.

Read

pub readonly fn Read<T>(Object: ValueRef) -> Result<T, InvocationStatus>
        where T: Copyable

Copies a field through a previously erased live receiver, retaining checked validation on every read. T: Exact Copyable field type. Object: Nonowning view that remains valid for this call. Return: Copied value or validation status.

Example

module example.reflection_cached_view;
from std.reflection import TypeOf, Erase, PrivateAccess;
final class Counter { pub Value: i32 = 42; pub init() {} }
pub fn Main() -> i32 {
    let Instance = Counter();
    let Field = switch TypeOf<Counter>().FindField("Value", .Declared) {
        case .Ok { Value = Found } => break Found;
        case .Err { Error = _ } => return 1;
    };
    let View = Erase(Instance);
    let First = switch Field.Read<i32>(View) {
        case .Ok { Value = Found } => break Found;
        case .Err { Error = _ } => return 2;
    };
    let PublicAccess: PrivateAccess = .Deny;
    let Second = switch Field.Read<i32>(View, PublicAccess) {
        case .Ok { Value = Found } => break Found;
        case .Err { Error = _ } => return 3;
    };
    return First + Second - 42;
}

Read

pub readonly fn Read<T>(Object: ValueRef, Access: PrivateAccess) -> Result<T, InvocationStatus>
        where T: Copyable

Copies a field through a cached receiver with explicit private access. T: Exact Copyable field type. Object: Live cached receiver. Access: Private-access policy. Return: Copied value or status.

ReadStatic

pub readonly fn ReadStatic<T>() -> Result<T, InvocationStatus>
        where T: Copyable

Copies a static field into compiler-owned result storage. T: Exact Copyable field type. Return: Copied value or validation status.

ReadStatic

pub readonly fn ReadStatic<T>(Access: PrivateAccess) -> Result<T, InvocationStatus>
        where T: Copyable

Copies a static field with explicit private-access policy. T: Exact Copyable field type. Access: Private-access policy. Return: Copied value or validation status.

Borrow

pub readonly fn Borrow<T, I>(Object: readonly I&) -> Result<ReadBorrow<T>, InvocationStatus>

Borrows a live field without copying it. T: Exact field type. I: Receiver type. Object: Live readable receiver. Return: Checked readonly borrow or status.

Borrow

pub readonly fn Borrow<T, I>(Object: readonly I&, Access: PrivateAccess) -> Result<ReadBorrow<T>, InvocationStatus>

Borrows a live field with explicit access authority. T: Exact field type. I: Receiver type. Object: Live readable receiver. Access: Private-access policy. Return: Checked readonly borrow or status.

Borrow

pub readonly fn Borrow<T, I>(Object: mut I&) -> Result<ReadBorrow<T>, InvocationStatus>

Borrows a field through a writable receiver without granting write access. T: Exact field type. I: Receiver type. Object: Live writable receiver. Return: Checked readonly borrow or status.

Borrow

pub readonly fn Borrow<T, I>(Object: mut I&, Access: PrivateAccess) -> Result<ReadBorrow<T>, InvocationStatus>

Borrows a writable receiver's field with explicit access policy. T: Exact field type. I: Receiver type. Object: Live writable receiver. Access: Private-access policy. Return: Checked readonly borrow or status.

BorrowStatic

pub readonly fn BorrowStatic<T>() -> Result<ReadBorrow<T>, InvocationStatus>

Borrows static field storage without copying it. T: Exact field type. Return: Checked readonly borrow or status.

BorrowStatic

pub readonly fn BorrowStatic<T>(Access: PrivateAccess) -> Result<ReadBorrow<T>, InvocationStatus>

Borrows static field storage with explicit access policy. T: Exact field type. Access: Private-access policy. Return: Checked readonly borrow or status.

BorrowMut

pub readonly fn BorrowMut<T, I>(Object: mut I&) -> Result<WriteBorrow<T>, InvocationStatus>

Borrows writable field storage after checking receiver and field access. T: Exact field type. I: Receiver type. Object: Live writable receiver. Return: Checked writable borrow or status.

BorrowMut

pub readonly fn BorrowMut<T, I>(Object: mut I&, Access: PrivateAccess) -> Result<WriteBorrow<T>, InvocationStatus>

Borrows writable field storage with explicit access policy. T: Exact field type. I: Receiver type. Object: Live writable receiver. Access: Private-access policy. Return: Checked writable borrow or status.

BorrowStaticMut

pub readonly fn BorrowStaticMut<T>() -> Result<WriteBorrow<T>, InvocationStatus>

Borrows writable static field storage. T: Exact field type. Return: Checked writable borrow or status.

BorrowStaticMut

pub readonly fn BorrowStaticMut<T>(Access: PrivateAccess) -> Result<WriteBorrow<T>, InvocationStatus>

Borrows writable static storage with explicit access policy. T: Exact field type. Access: Private-access policy. Return: Checked writable borrow or status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: readonly T&) -> Result<void, InvocationStatus>
        where T: CopyAssignable

Copies a value into a writable instance field after checked validation. T: Exact field type. I: Receiver type. Object: Live writable receiver. Value: Borrowed copy source. Return: Success or validation status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: readonly T&, Access: PrivateAccess) -> Result<void, InvocationStatus>
        where T: CopyAssignable

Copies a value into a writable field with explicit private-access policy. T: Exact field type. I: Receiver type. Object: Live writable receiver. Value: Borrowed copy source. Access: Private-access policy. Return: Success or validation status.

WriteStatic

pub readonly fn WriteStatic<T>(Value: readonly T&) -> Result<void, InvocationStatus>
        where T: CopyAssignable

Copies a value into a static field after checked validation. T: Exact field type. Value: Borrowed copy source. Return: Success or validation status.

WriteStatic

pub readonly fn WriteStatic<T>(Value: readonly T&, Access: PrivateAccess) -> Result<void, InvocationStatus>
        where T: CopyAssignable

Copies a value into a static field with explicit private-access policy. T: Exact field type. Value: Borrowed copy source. Access: Private-access policy. Return: Success or validation status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: mut T&&) -> Result<void, InvocationStatus>
        where T: MoveAssignable

Assigns a moved source to a writable instance field after checked validation. T: Exact MoveAssignable field type. I: Receiver type. Object: Live writable receiver. Value: Live writable move source. Return: Success or validation status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: mut T&&, Access: PrivateAccess) -> Result<void, InvocationStatus>
        where T: MoveAssignable

Assigns a moved source with explicit private-access policy. T: Exact MoveAssignable field type. I: Receiver type. Object: Live writable receiver. Value: Live writable move source. Access: Private-access policy. Return: Success or validation status.

WriteStatic

pub readonly fn WriteStatic<T>(Value: mut T&&) -> Result<void, InvocationStatus>
        where T: MoveAssignable

Assigns a moved source to a writable static field after checked validation. T: Exact MoveAssignable field type. Value: Live writable move source. Return: Success or validation status.

WriteStatic

pub readonly fn WriteStatic<T>(Value: mut T&&, Access: PrivateAccess) -> Result<void, InvocationStatus>
        where T: MoveAssignable

Assigns a moved source to a writable static field with explicit private-access policy. T: Exact MoveAssignable field type. Value: Live writable move source. Access: Private-access policy. Return: Success or validation status.

FirstAttribute

pub readonly fn FirstAttribute<A>() -> FrozenAttribute<A>?

Finds the first direct final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

FirstEffectiveAttribute

pub readonly fn FirstEffectiveAttribute<A>() -> FrozenAttribute<A>?

Finds the first effective final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

HasEffectiveAttribute

pub readonly fn HasEffectiveAttribute<A>() -> bool

Tests one exact effective attribute type. A: Attribute selector. Return: True when effective.

HasAttribute

pub readonly fn HasAttribute<A>() -> bool

Tests one exact direct field attribute. A: Attribute selector. Return: True when attached.

PropertyInfo

pub final class PropertyInfo

References immutable metadata for one reflected instance property.

pub Name: str

pub Name: str

Borrows property name. Return: Registered UTF-8.

pub DeclaringType: TypeInfo

pub DeclaringType: TypeInfo

Returns declaring nominal type. Return: Type descriptor.

pub ValueType: TypeInfo

pub ValueType: TypeInfo

Returns by-value property type. Return: Type descriptor.

pub Visibility: Visibility

pub Visibility: Visibility

Returns property visibility. Return: Visibility value.

pub Getter: MethodInfo

pub Getter: MethodInfo

Returns required getter descriptor. Return: Method descriptor.

pub Setter: MethodInfo?

pub Setter: MethodInfo?

Returns optional setter descriptor. Return: Method descriptor or none.

pub BackingField: FieldInfo?

pub BackingField: FieldInfo?

Returns auto-property backing field. Return: Field descriptor or none.

pub IsVirtual: bool

pub IsVirtual: bool

Reports virtual dispatch. Return: True for virtual property.

pub IsOverride: bool

pub IsOverride: bool

Reports override status. Return: True for override property.

pub IsSealedOverride: bool

pub IsSealedOverride: bool

Reports sealed override status. Return: True for sealed override.

pub AttributeCount: usize

pub AttributeCount: usize

Returns attached attribute count. Return: Deterministic count.

AttributeAt

pub readonly fn AttributeAt(Index: usize) -> AttributeInfo?

Selects one attached attribute. Index: Zero-based index. Return: Descriptor or none.

AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

Returns this property's canonical emitted site. Return: Site or none.

EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained property attributes. Return: Effective count.

EffectiveAttributeAt

pub readonly fn EffectiveAttributeAt(Index: usize) -> AttributeInfo?

Selects an effective property attribute. Index: Zero-based index. Return: Attribute or none.

Attributes

pub readonly fn Attributes() -> PropertyAttributeView

Enumerates direct property attributes. Return: Fresh nonowning view.

EffectiveAttributes

pub readonly fn EffectiveAttributes() -> PropertyEffectiveAttributeView

Enumerates effective attributes in published order. Return: Independent nonowning view.

AttributesOf

pub readonly fn AttributesOf<A>() -> PropertyFilteredAttributeView<A>

Enumerates direct attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

EffectiveAttributesOf

pub readonly fn EffectiveAttributesOf<A>() -> PropertyEffectiveFilteredAttributeView<A>

Enumerates effective attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

Read

pub readonly fn Read<T, I>(Object: readonly I&) -> Result<T, InvocationStatus>

Invokes this property's getter and returns its owned value after checked validation. T: Exact property value type. I: Receiver type. Object: Live readable receiver. Return: Getter value or validation status.

Read

pub readonly fn Read<T, I>(Object: readonly I&, Access: PrivateAccess) -> Result<T, InvocationStatus>

Invokes this property's getter with explicit private-access policy. T: Exact property value type. I: Receiver type. Object: Live readable receiver. Access: Private-access policy. Return: Getter value or validation status.

Read

pub readonly fn Read<T, I>(Object: mut I&) -> Result<T, InvocationStatus>

Invokes this property's getter through a writable receiver without consuming it. T: Exact property value type. I: Receiver type. Object: Live writable receiver. Return: Getter value or validation status.

Read

pub readonly fn Read<T, I>(Object: mut I&, Access: PrivateAccess) -> Result<T, InvocationStatus>

Invokes this property's getter through a writable receiver with explicit private-access policy. T: Exact property value type. I: Receiver type. Object: Live writable receiver. Access: Private-access policy. Return: Getter value or validation status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: readonly T&) -> Result<void, InvocationStatus>
        where T: Copyable

Calls this property's setter with a delayed copy after validation. T: Exact Copyable setter value type. I: Receiver type. Object: Live writable receiver. Value: Borrowed copy source. Return: Success or validation status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: readonly T&, Access: PrivateAccess) -> Result<void, InvocationStatus>
        where T: Copyable

Calls this property's setter with a delayed copy and explicit access policy. T: Exact Copyable setter value type. I: Receiver type. Object: Live writable receiver. Value: Borrowed copy source. Access: Private-access policy. Return: Success or validation status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: mut T&&) -> Result<void, InvocationStatus>
        where T: Movable

Calls this property's setter with a delayed move after validation. T: Exact Movable setter value type. I: Receiver type. Object: Live writable receiver. Value: Writable rvalue source. Return: Success or validation status.

Write

pub readonly fn Write<T, I>(Object: mut I&, Value: mut T&&, Access: PrivateAccess) -> Result<void, InvocationStatus>
        where T: Movable

Calls this property's setter with a delayed move and explicit access policy. T: Exact Movable setter value type. I: Receiver type. Object: Live writable receiver. Value: Writable rvalue source. Access: Private-access policy. Return: Success or validation status.

FirstAttribute

pub readonly fn FirstAttribute<A>() -> FrozenAttribute<A>?

Finds the first direct final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

FirstEffectiveAttribute

pub readonly fn FirstEffectiveAttribute<A>() -> FrozenAttribute<A>?

Finds the first effective final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

HasEffectiveAttribute

pub readonly fn HasEffectiveAttribute<A>() -> bool

Tests one exact effective attribute type. A: Attribute selector. Return: True when effective.

HasAttribute

pub readonly fn HasAttribute<A>() -> bool

Tests one exact direct property attribute. A: Attribute selector. Return: True when attached.

MethodInfo

pub final class MethodInfo

References immutable metadata and one generated typed adapter for a method.

pub Name: str

pub Name: str

Borrows method name. Return: Registered UTF-8.

pub DeclaringType: TypeInfo

pub DeclaringType: TypeInfo

Returns declaring nominal type. Return: Type descriptor.

pub Visibility: Visibility

pub Visibility: Visibility

Returns authored visibility. Return: Visibility value.

pub IsStatic: bool

pub IsStatic: bool

Reports static versus instance call. Return: True for no receiver.

pub IsVirtual: bool

pub IsVirtual: bool

Reports virtual dispatch. Return: True for virtual method.

pub IsOverride: bool

pub IsOverride: bool

Reports override status. Return: True for override method.

pub ResultType: TypeInfo

pub ResultType: TypeInfo

Returns exact result type. Return: Type descriptor including Void.

pub ResultMode: ReturnMode

pub ResultMode: ReturnMode

Returns exact result mode. Return: ReturnMode.

Bind

pub readonly fn Bind<R>() -> Result<BoundMethod<R>, InvocationStatus>

Binds this exact published method with one requested result type. R: Expected result type. Return: Nonowning bound method, or exact validation status.

Bind

pub readonly fn Bind<R>(Access: PrivateAccess) -> Result<BoundMethod<R>, InvocationStatus>

Binds this exact method using explicit checked private access. R: Expected result type. Access: Private-member authority. Return: Nonowning bound method, or exact validation status.

pub ParameterCount: usize

pub ParameterCount: usize

Returns ordered parameter count. Return: Deterministic count.

pub AttributeCount: usize

pub AttributeCount: usize

Returns attached attribute count. Return: Deterministic count.

ParameterAt

pub readonly fn ParameterAt(Index: usize) -> ParameterInfo?

Selects one parameter descriptor. Index: Zero-based position. Return: Descriptor or none.

AttributeAt

pub readonly fn AttributeAt(Index: usize) -> AttributeInfo?

Selects one attached attribute. Index: Zero-based index. Return: Descriptor or none.

AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

Returns this method's canonical emitted site. Return: Site or none.

EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained method attributes. Return: Effective count.

EffectiveAttributeAt

pub readonly fn EffectiveAttributeAt(Index: usize) -> AttributeInfo?

Selects an effective method attribute. Index: Zero-based index. Return: Attribute or none.

Attributes

pub readonly fn Attributes() -> MethodAttributeView

Enumerates direct method attributes. Return: Fresh nonowning view.

EffectiveAttributes

pub readonly fn EffectiveAttributes() -> MethodEffectiveAttributeView

Enumerates effective attributes in published order. Return: Independent nonowning view.

AttributesOf

pub readonly fn AttributesOf<A>() -> MethodFilteredAttributeView<A>

Enumerates direct attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

EffectiveAttributesOf

pub readonly fn EffectiveAttributesOf<A>() -> MethodEffectiveFilteredAttributeView<A>

Enumerates effective attributes of one exact type. A: Attribute selector. Return: Independent filtered view.

FirstAttribute

pub readonly fn FirstAttribute<A>() -> FrozenAttribute<A>?

Finds the first direct final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

FirstEffectiveAttribute

pub readonly fn FirstEffectiveAttribute<A>() -> FrozenAttribute<A>?

Finds the first effective final value of one exact attribute type. A: Attribute type. Return: Generation-borrowed typed view or none.

HasEffectiveAttribute

pub readonly fn HasEffectiveAttribute<A>() -> bool

Tests one exact effective attribute type. A: Attribute selector. Return: True when effective.

HasAttribute

pub readonly fn HasAttribute<A>() -> bool

Tests one exact direct method attribute. A: Attribute selector. Return: True when attached.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library