# `GSLayer segments`

*Instance Method*

The path segments from all path shapes in linear shape order.

## Declaration

```swift
func segments() -> [GSPathSegment]
```

```objc
- (NSArray<GSPathSegment *> *) segments;
```

```python
segments() -> list[GSPathSegment]
```

## See Also

### Segments

- [`GSLayer segmentAtIndexPath:`](/Core/GlyphsCore/GSLayer/segmentAtIndexPath:) — Returns the segment at an index path.

