CircularBuffer (ext)
You’re viewing third-party extensions to CircularBuffer
, a struct from swift-nio.
You can also read the documentation forCircularBuffer
itself.
extension CircularBuffer
You’re viewing third-party extensions to CircularBuffer
, a struct from swift-nio.
You can also read the documentation forCircularBuffer
itself.
extension CircularBuffer
struct CircularBuffer<Element>
An automatically expanding ring buffer implementation backed by a ContiguousArray
. Even though this implementation will automatically expand if more elements than initialCapacity
are stored, it’s advantageous to prevent expansions from happening frequently. Expansions will always force an allocation and a copy to happen.
import MongoKitten
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable
var string: String { get }
Converts a sequence of DNS labels to a string.
func compare<Comparator>(_ lhs: Comparator.Compared, _ rhs: Comparator.Compared) -> ComparisonResult where Comparator : SortComparator, Comparator == Self.Element
If lhs
is ordered before rhs
in the ordering described by the given sequence of SortComparator
s
func formatted() -> String
func formatted<S>(_ style: S) -> S.FormatOutput where Self == S.FormatInput, S : FormatStyle
mutating func sort<Comparator>(using comparator: Comparator) where Comparator : SortComparator, Self.Element == Comparator.Compared
Sorts the collection using the given comparator to compare elements.
mutating func sort<S, Comparator>(using comparators: S) where S : Sequence, Comparator : SortComparator, Comparator == S.Element, Self.Element == Comparator.Compared
Sorts the collection using the given array of SortComparator
s to compare elements.
func sorted<Comparator>(using comparator: Comparator) -> [Self.Element] where Comparator : SortComparator, Self.Element == Comparator.Compared
Returns the elements of the sequence, sorted using the given comparator to compare elements.
func sorted<S, Comparator>(using comparators: S) -> [Self.Element] where S : Sequence, Comparator : SortComparator, Comparator == S.Element, Self.Element == Comparator.Compared
Returns the elements of the sequence, sorted using the given array of SortComparator
s to compare elements.
import Meow
func resolve(in database: MeowDatabase, where query: Document = Document()) async throws -> [Element.Result]
Resolves the contained references
func resolveIfPresent(in database: MeowDatabase, where query: Document = Document()) async throws -> [Element.IfPresentResult]