Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

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.

AttributeSiteInfo.Kind

pub Kind: AttributeTarget;

Returns the semantic target category. Return: AttributeTarget case.

AttributeSiteInfo.Identity

pub Identity: usize;

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

AttributeSiteInfo.Name

pub Name: str?;

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

AttributeSiteInfo.Position

pub Position: usize?;

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

AttributeSiteInfo.Owner

pub readonly fn Owner() -> AttributeSiteInfo?

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

AttributeSiteInfo.AttributeCount

pub readonly fn AttributeCount() -> usize

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

AttributeSiteInfo.AttributeAt

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

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

AttributeSiteInfo.EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts attributes after inheritance policy. Return: Effective count.

AttributeSiteInfo.EffectiveAttributeAt

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

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

AttributeSiteInfo.Attributes

pub readonly fn Attributes() -> SiteAttributeView

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

AttributeSiteInfo.EffectiveAttributes

pub readonly fn EffectiveAttributes() -> SiteEffectiveAttributeView

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

AttributeSiteInfo.AttributesOf

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

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

AttributeSiteInfo.EffectiveAttributesOf

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

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

AttributeSiteInfo.HasAttribute

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

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

AttributeSiteInfo.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.

AttributeSiteInfo.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.

AttributeSiteInfo.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.

AttributeInfo.AttributeType

pub AttributeType: TypeInfo;

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

AttributeInfo.ArgumentCount

pub ArgumentCount: usize;

Returns immutable argument count. Return: Ordered argument count.

AttributeInfo.ArgumentAt

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

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

AttributeInfo.FrozenValueRef

pub readonly fn FrozenValueRef() -> ValueRef?

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

AttributeInfo.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.

ParameterInfo.Name

pub Name: str;

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

ParameterInfo.Type

pub Type: TypeInfo;

Returns exact parameter type. Return: Type descriptor.

ParameterInfo.Mode

pub Mode: ParameterMode;

Returns declared passing mode. Return: ParameterMode.

ParameterInfo.Position

pub Position: usize;

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

ParameterInfo.AttributeCount

pub AttributeCount: usize;

Returns attached attribute count. Return: Deterministic count.

ParameterInfo.AttributeAt

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

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

ParameterInfo.AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

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

ParameterInfo.EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained parameter attributes. Return: Effective count.

ParameterInfo.EffectiveAttributeAt

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

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

ParameterInfo.Attributes

pub readonly fn Attributes() -> ParameterAttributeView

Enumerates direct parameter attributes. Return: Fresh nonowning view.

ParameterInfo.EffectiveAttributes

pub readonly fn EffectiveAttributes() -> ParameterEffectiveAttributeView

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

ParameterInfo.AttributesOf

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

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

ParameterInfo.EffectiveAttributesOf

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

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

ParameterInfo.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.

ParameterInfo.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.

ParameterInfo.HasEffectiveAttribute

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

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

ParameterInfo.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.

FieldInfo.Name

pub Name: str;

Borrows field name. Return: Registered UTF-8.

FieldInfo.DeclaringType

pub DeclaringType: TypeInfo;

Returns declaring nominal type. Return: Type descriptor.

FieldInfo.ValueType

pub ValueType: TypeInfo;

Returns exact stored value type. Return: Type descriptor.

FieldInfo.Visibility

pub Visibility: Visibility;

Returns authored visibility. Return: Visibility value.

FieldInfo.IsStatic

pub IsStatic: bool;

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

FieldInfo.IsMutable

pub IsMutable: bool;

Reports writable field access. Return: Declared mutability.

FieldInfo.IsCompilerGenerated

pub IsCompilerGenerated: bool;

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

FieldInfo.AutoProperty

pub AutoProperty: PropertyInfo?;

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

FieldInfo.AttributeCount

pub AttributeCount: usize;

Returns attached attribute count. Return: Deterministic count.

FieldInfo.AttributeAt

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

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

FieldInfo.AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

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

FieldInfo.EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained field attributes. Return: Effective count.

FieldInfo.EffectiveAttributeAt

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

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

FieldInfo.Attributes

pub readonly fn Attributes() -> FieldAttributeView

Enumerates direct field attributes. Return: Fresh nonowning view.

FieldInfo.EffectiveAttributes

pub readonly fn EffectiveAttributes() -> FieldEffectiveAttributeView

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

FieldInfo.AttributesOf

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

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

FieldInfo.EffectiveAttributesOf

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

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

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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;
}

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.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.

FieldInfo.HasEffectiveAttribute

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

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

FieldInfo.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.

PropertyInfo.Name

pub Name: str;

Borrows property name. Return: Registered UTF-8.

PropertyInfo.DeclaringType

pub DeclaringType: TypeInfo;

Returns declaring nominal type. Return: Type descriptor.

PropertyInfo.ValueType

pub ValueType: TypeInfo;

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

PropertyInfo.Visibility

pub Visibility: Visibility;

Returns property visibility. Return: Visibility value.

PropertyInfo.Getter

pub Getter: MethodInfo;

Returns required getter descriptor. Return: Method descriptor.

PropertyInfo.Setter

pub Setter: MethodInfo?;

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

PropertyInfo.BackingField

pub BackingField: FieldInfo?;

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

PropertyInfo.IsVirtual

pub IsVirtual: bool;

Reports virtual dispatch. Return: True for virtual property.

PropertyInfo.IsOverride

pub IsOverride: bool;

Reports override status. Return: True for override property.

PropertyInfo.IsSealedOverride

pub IsSealedOverride: bool;

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

PropertyInfo.AttributeCount

pub AttributeCount: usize;

Returns attached attribute count. Return: Deterministic count.

PropertyInfo.AttributeAt

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

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

PropertyInfo.AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

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

PropertyInfo.EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained property attributes. Return: Effective count.

PropertyInfo.EffectiveAttributeAt

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

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

PropertyInfo.Attributes

pub readonly fn Attributes() -> PropertyAttributeView

Enumerates direct property attributes. Return: Fresh nonowning view.

PropertyInfo.EffectiveAttributes

pub readonly fn EffectiveAttributes() -> PropertyEffectiveAttributeView

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

PropertyInfo.AttributesOf

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

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

PropertyInfo.EffectiveAttributesOf

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

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

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.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.

PropertyInfo.HasEffectiveAttribute

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

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

PropertyInfo.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.

MethodInfo.Name

pub Name: str;

Borrows method name. Return: Registered UTF-8.

MethodInfo.DeclaringType

pub DeclaringType: TypeInfo;

Returns declaring nominal type. Return: Type descriptor.

MethodInfo.Visibility

pub Visibility: Visibility;

Returns authored visibility. Return: Visibility value.

MethodInfo.IsStatic

pub IsStatic: bool;

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

MethodInfo.IsVirtual

pub IsVirtual: bool;

Reports virtual dispatch. Return: True for virtual method.

MethodInfo.IsOverride

pub IsOverride: bool;

Reports override status. Return: True for override method.

MethodInfo.ResultType

pub ResultType: TypeInfo;

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

MethodInfo.ResultMode

pub ResultMode: ReturnMode;

Returns exact result mode. Return: ReturnMode.

MethodInfo.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.

MethodInfo.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.

MethodInfo.ParameterCount

pub ParameterCount: usize;

Returns ordered parameter count. Return: Deterministic count.

MethodInfo.AttributeCount

pub AttributeCount: usize;

Returns attached attribute count. Return: Deterministic count.

MethodInfo.ParameterAt

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

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

MethodInfo.AttributeAt

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

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

MethodInfo.AttributeSite

pub readonly fn AttributeSite() -> AttributeSiteInfo?

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

MethodInfo.EffectiveAttributeCount

pub readonly fn EffectiveAttributeCount() -> usize

Counts effective retained method attributes. Return: Effective count.

MethodInfo.EffectiveAttributeAt

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

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

MethodInfo.Attributes

pub readonly fn Attributes() -> MethodAttributeView

Enumerates direct method attributes. Return: Fresh nonowning view.

MethodInfo.EffectiveAttributes

pub readonly fn EffectiveAttributes() -> MethodEffectiveAttributeView

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

MethodInfo.AttributesOf

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

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

MethodInfo.EffectiveAttributesOf

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

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

MethodInfo.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.

MethodInfo.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.

MethodInfo.HasEffectiveAttribute

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

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

MethodInfo.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