Skip to content

Commit 0d0dec2

Browse files
committed
add a capacity method
1 parent 51f8d08 commit 0d0dec2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ impl<T> Trailer<T> {
6868
)
6969
}
7070
}
71+
72+
pub fn capacity(&self) -> usize {
73+
self.size - mem::size_of::<T>()
74+
}
7175
}
7276

7377
impl<T> Drop for Trailer<T> {

0 commit comments

Comments
 (0)