---
title: Basic Behaviors
framework: swift
role: collectionGroup
role_heading: API Collection
path: swift/basic-behaviors
---

# Basic Behaviors

Use your custom types in operations that depend on testing for equality or order and as members of sets and dictionaries.

## Topics

### Equality and Ordering

- [Equatable](swift/equatable.md)
- [Comparable](swift/comparable.md)
- [Identifiable](swift/identifiable.md)

### Copying

- [Copyable](swift/copyable.md)
- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Escapable](swift/escapable.md)

### Sets and Dictionaries

- [Hashable](swift/hashable.md)
- [Hasher](swift/hasher.md)

### String Representation

- [CustomStringConvertible](swift/customstringconvertible.md)
- [LosslessStringConvertible](swift/losslessstringconvertible.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)

### Raw Representation

- [CaseIterable](swift/caseiterable.md)
- [RawRepresentable](swift/rawrepresentable.md)

## See Also

### Tools for Your Types

- [Encoding, Decoding, and Serialization](swift/encoding-decoding-and-serialization.md)
- [Initialization with Literals](swift/initialization-with-literals.md)
