# Introduce buffer::Content\<'a\> struct to share logic with buffer::Snapshot · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/09afba92511eecc59aa2eb6e201fe3d8da047a65)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 09afba92511eecc59aa2eb6e201fe3d8da047a65

Requested commit: 09afba92511eecc59aa2eb6e201fe3d8da047a65

Commit: 09afba92511eecc59aa2eb6e201fe3d8da047a65

Tree: cd8c5dfe51a915f793557b3bdd07c3898872e7ab

Author: Nathan Sobo

Committer: Nathan Sobo

## Message

```
Introduce buffer::Content<'a> struct to share logic with buffer::Snapshot

We want to move a bunch of methods on FoldMap to fold_map::Snapshot. This captures a buffer snapshot, and we'll need a bunch of methods that currently are on Buffer to also be implemented on buffer::Snapshot. This Content reference struct will be a good zero-cost place to store that logic.

```

## Parents

- [be954872d0f9f240cf1806ddad5107e2cc171f90](https://git.cafe/gitcafe/zed/commit/be954872d0f9f240cf1806ddad5107e2cc171f90?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/09afba92511eecc59aa2eb6e201fe3d8da047a65?format=markdown)
