{"modulePath":"github.com/openimsdk/tools","version":"v0.0.50-alpha.127","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package bound\n\n## Variables\n\n```go\nvar (\n\tErrQueueFull  = errors.New(\"queue is full\")\n\tErrQueueEmpty = errors.New(\"queue is empty\")\n)\n```\n\n## Types\n\n```go\ntype Queue[T any] struct {\n\t// contains filtered or unexported fields\n}\n```\nQueue has its capacity. Push returns an error when the Queue is full.\n\n```go\nfunc NewQueue[T any](capacity int) *Queue[T]\n```\n\n```go\nfunc (q *Queue[T]) Contains(item T, equalFunc func(a, b T) bool) bool\n```\n\n```go\nfunc (q *Queue[T]) ForcePush(item T)\n```\nForcePush pushes an item to the queue regardless of capacity. If the queue is at capacity, it will exceed the capacity limit.\n\n```go\nfunc (q *Queue[T]) Full() bool\n```\n\n```go\nfunc (q *Queue[T]) Len() int\n```\n\n```go\nfunc (q *Queue[T]) Peek(item T, equalFunc func(a, b T) bool) int\n```\n\n```go\nfunc (q *Queue[T]) Pop() (T, error)\n```\n\n```go\nfunc (q *Queue[T]) Push(item T) error\n```\n\n```go\nfunc (q *Queue[T]) Remove(item T, equalFunc func(a, b T) bool) bool\n```\n\n","path":"github.com/openimsdk/tools/queue/bound","name":"bound","synopsis":"","isRedistributable":true}
