# DiffableDataSourceTarget

    public protocol DiffableDataSourceTarget

The `DiffableDataSource.Target` protocol allows custom views to consume `ListSnapshot` diffable data similar to how `DiffableDataSource.TableViewAdapter` and `DiffableDataSource.CollectionViewAdapter` reloads data for their corresponding views.

### Public

- `shouldSuspendBatchUpdates`

  Whether `reloadData()` should be executed instead of `performBatchUpdates(updates:animated:)`.

  #### Declaration

  Swift

      var shouldSuspendBatchUpdates: Bool { get }

- `deleteSections(at:animated:)`

  Deletes one or more sections.

  #### Declaration

  Swift

      func deleteSections(at indices: IndexSet, animated: Bool)

- `insertSections(at:animated:)`

  Inserts one or more sections

  #### Declaration

  Swift

      func insertSections(at indices: IndexSet, animated: Bool)

- `reloadSections(at:animated:)`

  Reloads the specified sections.

  #### Declaration

  Swift

      func reloadSections(at indices: IndexSet, animated: Bool)

- `moveSection(at:to:animated:)`

  Moves a section to a new location.

  #### Declaration

  Swift

      func moveSection(at index: IndexSet.Element, to newIndex: IndexSet.Element, animated: Bool)

- `deleteItems(at:animated:)`

  Deletes the items specified by an array of index paths.

  #### Declaration

  Swift

      func deleteItems(at indexPaths: [IndexPath], animated: Bool)

- `insertItems(at:animated:)`

  Inserts items at the locations identified by an array of index paths.

  #### Declaration

  Swift

      func insertItems(at indexPaths: [IndexPath], animated: Bool)

- `reloadItems(at:animated:)`

  Reloads the specified items.

  #### Declaration

  Swift

      func reloadItems(at indexPaths: [IndexPath], animated: Bool)

- `moveItem(at:to:animated:)`

  Moves the item at a specified location to a destination location.

  #### Declaration

  Swift

      func moveItem(at indexPath: IndexPath, to newIndexPath: IndexPath, animated: Bool)

- `performBatchUpdates(updates:animated:completion:)`

  Animates multiple insert, delete, reload, and move operations as a group.

  #### Declaration

  Swift

      func performBatchUpdates(updates: () -> Void, animated: Bool, completion: @escaping () -> Void)

- `reloadData()`

  Reloads all sections and items.

  #### Declaration

  Swift

      func reloadData()