37
49

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Rust で新しく struct や enum を定義するときに実装を検討する trait まとめ

Last updated at Posted at 2021-06-27

メモっとかないとよく忘れるんですよ…… (おい)

基本

  • Clone, Copy
  • Default
  • Debug, Display

比較

  • PartialEq, Eq
  • PartialOrd, Ord

変換

  • Deref, DerefMut
  • AsRef, AsMut
  • Borrow, BorrowMut
  • From, TryFrom
  • FromStr
  • ToOwned

出力

  • Binary
  • Octal
  • LowerHex, UpperHex
  • LowerExp, UpperExp
  • Pointer

特定用途向け

エラー用

  • Error

ハッシュテーブルの要素用

  • Hash

コンテナー用

  • Extend
  • FromIterator
  • IntoIterator

演算子

  • Sum, Product
  • Add, AddAssign, Sub, SubAssign, Mul, MulAssign, Div, DivAssign, Rem, RemAssign,
  • Shl, ShlAssign, Shr, ShrAssign
  • BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign
  • Neg, Not
  • Index, IndexMut
  • RangeBounds
37
49
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
37
49

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?