Traversals for ByteStrings.
Methods
packedBytes :: Iso' [Word8] tpack (or unpack) a list of bytes into a strict or lazy
ByteString.pack x ≡ x ^. packedBytes unpack x ≡ x ^. re packedBytes packedBytes ≡ re unpackedBytespackedChars :: Iso' String tpack (or unpack) a list of characters into a strict or lazy
ByteString.When writing back to the
ByteStringit is assumed that every Char lies between'x00'and'xff'.pack x ≡ x ^. packedChars unpack x ≡ x ^. re packedChars packedChars ≡ re unpackedCharsbytes :: IxTraversal' Int64 t Word8Traverse each Word8 in a strict or lazy
ByteStringThis Traversal walks each strict
ByteStringchunk in a tree-like fashion enable zippers to seek to locations more quickly and accelerate many monoidal queries, but up to associativity (and constant factors) it is equivalent to the much slower:bytes ≡ unpackedBytes . traversedanyOf bytes (== 0x80) ::ByteString-> Boolchars :: IxTraversal' Int64 t CharTraverse the individual bytes in a strict or lazy
ByteStringas characters.When writing back to the
ByteStringit is assumed that every Char lies between'x00'and'xff'.This Traversal walks each strict
ByteStringchunk in a tree-like fashion enable zippers to seek to locations more quickly and accelerate many monoidal queries, but up to associativity (and constant factors) it is equivalent to the much slower:chars ≡ unpackedChars . traversedanyOf chars (== 'c') ::ByteString-> Bool
Instances2IsByteString
IsByteString ByteStringDefined in optics-extra-0.4.2.1 · Data.ByteString.OpticsIsByteString ByteStringDefined in optics-extra-0.4.2.1 · Data.ByteString.Optics