docs

你正在阅读 v0.1.2 的文档。Nabi 0.1.2 已不再提供支持。 最新版本:v0.1.3 →

core::reflect::attr

本页内容

API 参考只有英文版,由标准库源代码中的英文文档注释生成。

runtime attributes: values of a #[runtime_attribute(name)] struct written as #[name(..)] on a type, field or variant, kept in read-only data.

Structs

AttrSource

pub struct Attr

One runtime attribute on a type, field or variant.

  • pub fn type_ref(self) -> TypeRef§

    Source

    The attribute struct.

  • pub fn get<A>(self) -> A | none§

    Source

    Its value as an A, when it is one.

Trait implementations 2