From 7df56b0917cca5d0f760059e72b38d1ed177773f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 4 Apr 2025 02:20:14 +0900 Subject: [PATCH] feat(pbuf): add api CountItems --- pbuf/buffer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pbuf/buffer.go b/pbuf/buffer.go index d6006b5..d449c7b 100644 --- a/pbuf/buffer.go +++ b/pbuf/buffer.go @@ -26,3 +26,7 @@ func (bufferPool BufferPool[USRDAT]) ParseBuffer( ) *orbyte.Item[UserBuffer[USRDAT]] { return bufferPool.p.Parse(buf.Len(), buf) } + +func (bufferPool BufferPool[USRDAT]) CountItems() (outside int32, inside int32) { + return bufferPool.p.CountItems() +}