Union PathSegmentpub

Source
:union(pub) PathSegment
  | UnixSeg (Vec U8)
  | WindowsSeg (Vec U16)
Description

PathSegment is a narrow type representing a single path fragment in OS-native bytes. Mirrors Path's variants.

Variants

| UnixSeg Vec(U8)
| WindowsSeg Vec(U16)

Implementations

impl PathSegment

.to-str ( PathSegment (Result Str Str) )

.to-str — decode as UTF-8; Err on invalid sequences.

.to-string-lossy ( PathSegment Str )

.to-string-lossy — always-successful Str rendering.