Fragment
public struct Fragment
extension ContiguousSegmentCollection.Fragment: RandomAccessCollectionWrapping
extension ContiguousSegmentCollection.Fragment: IntervallicFragmentable
extension ContiguousSegmentCollection.Fragment: Equatable where
Segment: Equatable, Segment.Fragment: Equatable
A fragment of a ContiguousSegmentCollection
.
-
Undocumented
Declaration
Swift
public struct Item
extension ContiguousSegmentCollection.Fragment.Item: Equatable where Segment: Equatable, Segment.Fragment: Equatable
-
Declaration
Swift
public var offset: Metric { get }
Return Value
The offset of the fragment within the context of the whole.
-
Creates a
ContiguousSegmentCollection.Fragment
with the given pair of fragment items and the segments in-between.Declaration
Swift
public init( head: Item? = nil, body: ContiguousSegmentCollection = .empty, tail: Item? = nil )
-
Creates a
ContiguousSegmentCollection.Fragment
with the given pair of segment fragments and the segments in-between, offset by the givenoffset
.Declaration
Swift
public init( head: Segment.Fragment?, body: ContiguousSegmentCollection<Segment>, tail: Segment.Fragment? )
-
Undocumented
Declaration
Swift
public init(head: Segment.Fragment, body: ContiguousSegmentCollection<Segment>)
-
Undocumented
Declaration
Swift
public init(body: ContiguousSegmentCollection<Segment>, tail: Segment.Fragment)
-
Declaration
Swift
public var offsets: [Metric] { get }
Return Value
The offsets of each
Segment.Fragment
orSegment
contained herein.
-
A
ContiguousSegmentCollection.Fragment
produces itself as aFragment
.Declaration
Swift
public typealias Fragment = ContiguousSegmentCollection<Segment>.Fragment
-
A
ContiguousSegmentCollection
inherits itsMetric
from itsSegment
.Declaration
Swift
public typealias Metric = Segment.Metric
-
Declaration
Swift
public var length: Metric { get }
Return Value
The length of this
ContiguousSegmentCollection.Fragment
. -
Declaration
Swift
public func fragment(in range: Range<Metric>) -> ContiguousSegmentCollection<Segment>.Fragment
Return Value
A
ContiguousSegmentCollection.Fragment
in the givenrange
.