1
0
mirror of https://github.com/fumiama/orbyte.git synced 2026-06-05 02:00:30 +08:00

fix(pbuf): bytes slice trans

This commit is contained in:
源文雨
2025-02-25 14:22:31 +09:00
parent 8c5e0cfad0
commit 224f488d8e
3 changed files with 15 additions and 1 deletions

View File

@@ -41,6 +41,11 @@ func (b *Item[T]) Trans() (tb *Item[T]) {
return tb
}
// IsTrans whether this item has been marked as trans.
func (b *Item[T]) IsTrans() bool {
return b.stat.isintrans()
}
// Unwrap use value of the item
func (b *Item[T]) Unwrap() T {
if b.stat.hasdestroyed() {