(ctx context.Context)
| 136 | } |
| 137 | |
| 138 | func (b *bookmark[T]) current(ctx context.Context) (common.ID, T, error) { |
| 139 | if b.currentErr != nil { |
| 140 | return nil, nil, b.currentErr |
| 141 | } |
| 142 | |
| 143 | if b.currentObject != nil { |
| 144 | return b.currentID, b.currentObject, nil |
| 145 | } |
| 146 | |
| 147 | b.currentID, b.currentObject, b.currentErr = b.iter.Next(ctx) |
| 148 | return b.currentID, b.currentObject, b.currentErr |
| 149 | } |
| 150 | |
| 151 | func (b *bookmark[T]) done(ctx context.Context) bool { |
| 152 | nextID, err := b.iter.peekNextID(ctx) |