11 Attributes

속성은 몇 모듈, crate나 아이템에 적용되는 메타데이터이다. 이 메타데이터는 다음처럼/으로 사용될 수 있다:

속성이 전체 crate에 적용되야 할 때는 #![crate_attribute] 구문. 그리고 모듈이나 아이템에 적용되야 할 때는, #[item_attribute] 구문. (주의 !가 빠져있다.)

속성은 다른 문법으로 인자들을 취한다:

  • #[attribute = "value"]
  • #[attribute(key = "value")]
  • #[attribute(value)]

results matching ""

    No results matching ""