mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-09 00:15:23 -04:00
feat(sdk): Implement Chunk::content.
This patch implements `Chunk::content` to get an immutable reference to the content of a chunk.
This commit is contained in:
@@ -736,6 +736,11 @@ impl<Item, Gap, const CAPACITY: usize> Chunk<Item, Gap, CAPACITY> {
|
||||
self.identifier
|
||||
}
|
||||
|
||||
/// Get the content of the chunk.
|
||||
pub fn content(&self) -> &ChunkContent<T, U> {
|
||||
&self.content
|
||||
}
|
||||
|
||||
/// The length of the chunk, i.e. how many items are in it.
|
||||
///
|
||||
/// It will always return 0 if it's a gap chunk.
|
||||
|
||||
Reference in New Issue
Block a user