Documentation

Batteries.Data.ByteSubarray

A subarray of a ByteArray.

Instances For

    O(1). Get the size of a ByteSubarray.

    Equations
      Instances For

        O(1). Test if a ByteSubarray is empty.

        Equations
          Instances For

            O(n). Extract a ByteSubarray to a ByteArray.

            Equations
              Instances For
                @[inline]

                O(1). Get the element at index i from the start of a ByteSubarray.

                Equations
                  Instances For
                    @[inline]

                    O(1). Pop the last element of a ByteSubarray.

                    Equations
                      Instances For
                        @[inline]

                        O(1). Pop the first element of a ByteSubarray.

                        Equations
                          Instances For
                            @[inline]
                            def Batteries.ByteSubarray.foldlM {m : Type u_1 → Type u_2} {β : Type u_1} [Monad m] (self : ByteSubarray) (f : βUInt8m β) (init : β) :
                            m β

                            Folds a monadic function over a ByteSubarray from left to right.

                            Equations
                              Instances For
                                @[inline]
                                def Batteries.ByteSubarray.foldl {β : Type u_1} (self : ByteSubarray) (f : βUInt8β) (init : β) :
                                β

                                Folds a function over a ByteSubarray from left to right.

                                Equations
                                  Instances For
                                    @[specialize #[]]
                                    def Batteries.ByteSubarray.forIn {m : Type u_1 → Type u_2} {β : Type u_1} [Monad m] (self : ByteSubarray) (init : β) (f : UInt8βm (ForInStep β)) :
                                    m β

                                    Implementation of forIn for a ByteSubarray.

                                    Equations
                                      Instances For
                                        def Batteries.ByteSubarray.forIn.loop {m : Type u_1 → Type u_2} {β : Type u_1} [Monad m] (self : ByteSubarray) (f : UInt8βm (ForInStep β)) (i : Nat) (h : i self.size) (b : β) :
                                        m β

                                        Inner loop of the forIn implementation for ByteSubarray.

                                        Equations
                                          Instances For

                                            O(1). Coerce a byte array into a byte slice.

                                            Equations
                                              Instances For