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 Itemextension 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.Fragmentwith 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.Fragmentwith 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.FragmentorSegmentcontained herein.
-
A
ContiguousSegmentCollection.Fragmentproduces itself as aFragment.Declaration
Swift
public typealias Fragment = ContiguousSegmentCollection<Segment>.Fragment -
A
ContiguousSegmentCollectioninherits itsMetricfrom 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>.FragmentReturn Value
A
ContiguousSegmentCollection.Fragmentin the givenrange.
View on GitHub
Install in Dash
Fragment Structure Reference