Îõ³h&,ò)Å/      !"#$%&'()*+,-.  Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïóR/borshBit-for-bit copy from a to b0/ Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó1borshLittle Endian value2borsh8Convert from a little endian value to the cpu endianness341562 Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïóF7borsh#Peek at the start of the bytestringæIf the bytestring is long enough, returns the value, the size of that value, and the remaining bytes.4Implementation note: this could be simplified using bytestring >= 0.11 , as the offset× argument has been removed. As it stands, this implementation is backwards compatible.8borshO(1) splitAtEnd n xs is equivalent to (takeEnd n xs, dropEnd n xs) ñsplitAtEnd 0 "abcde" == ("abcde", "") splitAtEnd 1 "abcde" == ("abcd", "e") splitAtEnd 5 "abcde" == ("", "abcde")$Edge cases, similar to behaviour of 9::borshWrapper around ; with more sane return type<borshWrapper around = with more sane return type78:< Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïóÆ>borsh/Bunch of chunks, starting at a particular pointÈThe chunks are stored in reverse order, and we cache their total length.?borsh>The most common case: chunk of the input at a particular point@borsh(Value at a particular point in the inputAborsh Offset in bytes within the inputBborshConcatenate all chunks togetherÌNOTE: This is expensive, and should be used only in exception circumstances.Cborsh Add chunkÇThis does not affect the offset, since the chunk is (logically) at the end of the already-known chunksDborshÇSplit chunks at the required length, if sufficient chunks are available”Precondition: if the accumulated length exceeds the required length, we must be able to split the mostly added chunk to make up for the difference. >?@EAFBCD Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó ‡borshError type for deserialisation.GborshMonad for incremental decoding Think of G= as the monad we use for processing the full input, whereas Decoder> is the monad used for processing a single chunk of the input.borsh5The position of the decoder when the failure occurredborshMessage explaining the failureHIJKGLMNOPQR  Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïóÓSborsh9The decoder terminated successfully: we can stop decodingTborsh#The decoder failed: we should abortUborsh2The decoder needs more data before it can continue÷NOTE: The decoder that is waiting for more data may not be (and typically will not be) the decoder we started with in V¥: in the typical case, a bunch of values will have been decoded successfully before we get to a (continuation) decoder that requires data beyond the current chunk.Wborsh6Large token of known length that spans multiple chunksSee  for discussion.ÜThe continuation will be called with a lazy bytestring of precisely the requested length (provided enough input is available, of course), along with the remaining input token to be provided to the continuation decoder.XborshIncremental interfaceSee  for discussion.Yborsh Variation on X$, where we do not accumulate resultsSee  for discussion.borshDecoderÅA decoder describes how to match against a single chunk of the input.&For decoders for primitive types, use   instances.borshLift an Z operation into the  monad.[borshÍDecode a value encoded in little endian byte order (e.g. as mandated by the  https://borsh.ioBorsh spec).borsh6Large token of known length that spans multiple chunks’This is NOT incremental: all chunks will be read into memory before the result is returned. Primarily useful for large types that are not easily split into (valid) chunks, such as UTF8-encoded text (if were wanted to split that, we'd have to split it at UTF8 boundaries).borshIncremental interfaceÄWhen decoding large objects such as lists, we do not want to bring all required chunks into memory before decoding the list. Instead, we want to decode the list elements as we go. In this case, XÊ can be used to repeatedly decode a value using decoder for the elements.:NOTE: This interface is incremental in the sense that the  input chunks are read one at a time. It is NOT incremental in the generated output.borsh Variation on decoreIncremental$, where we do not accumulate resultsÕThis is useful for example for datatypes that we can update imperatively (using the Zß monad), such as mutable arrays. It could also be used to skip over unused parts of the input.\borshTop-level entry pointâWe start without any input at all (and depending on the specific decoder, we may never need any).]borsh#Run decoder against specified chunk^borshProcess decoder result_borsh Auxiliary to ^): process token that spans multple chunks”Precondition: if the accumulated length exceeds the required length, we must be able to split the mostly added chunk to make up for the difference.`borsh Auxiliary to ^: incremental decodingaborshImperative version of `See Y for discussion.borsh Run decoder WborshRequired number of bytesXborsh'How often to repeat the smaller decoderborshDecoder to repeatborshProcess all elementsYborsh'How often to repeat the smaller decoderborsh6Decoder to repeat (imperatively handling each element)borsh ContinuationborshNumber of bytes to decodeborsh,Number of elements in the sequence to decodeborsh# to run for the individual elementsborsh,Number of elements in the sequence to decodeborsh# to run for the individual elements_borshRequired total sizeborsh Continuationborsh Current chunk`borshNumber of elements requiredborshDecoder to repeatborsh+Continuation once we processed all elementsborsh Current chunkaborshNumber of elements requiredborshDecoder to repeatborsh+Continuation once we processed all elementsborsh Current chunkborshDecoderborshInputborshÖLeft-over input, offset of the left-over input relative to the start, and the result.bSUWXYTcV[ Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó<  Safe-Inferred#)*/012589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó¥d Safe-Inferred#)*/12589:;<=?ÀÁÂÃÄÅÌÍÑÔ×ÙÚÜãïóõborshMutable fixed-size arrays borshFixed size arraysFixedSizeArray n a. is the Haskell counter-part to the Rust type [A; N]..NOTE: For convenience, this is an instance of eà, but the invariant that the length of the vector should never change is not currently checked. borsh Construct   from list of unknown sizeËThrows an exception if the list does not have the right number of elements. borsh Construct   from array of unknown size>Throws an exception if the array does not have the right size.borsh Construct  # from mutable array of unknown size>Throws an exception if the array does not have the right size.borsh3Construct new mutable array of the appropriate size     Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó¹borshEncoderÄAn encoder describes how to serialise a given value in BORSH format.fghijklmnopqrstuvwxyz{|}  Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó -~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”• Safe-Inferred#)*/012589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó) borshAuxiliary class to  BorshSizeã describing the conditions under which the size of the encoding of a value of a sum-type is known.–borshType-level composition of ' and %—borshúA sum of products has known size if it has at most one constructor, and all arguments of that constructor have known size˜borsh Auxiliary to ™•Defined in such a way that we know the result is of variable size as soon as we encounter the first type of variable size (independent of the tail).™borshÁA product of types has known size if all types in the products doborsh Deriving-via support for structsThe Borsh spec  https://borsh.io/ã mandates that enums have a tag indicating the constructor, even when there is only a single constructor in the enum. In Rust this makes more sense than in Haskell, since in Rust enums and structs are introduced through different keywords. In Haskell, of course, the only difference between them is that a struct is an enum with a single constructor.2The default generic encoder en decoder you get in " and  Ÿ will therefore add the tag, independent of the number of constructors. If you want the encoding of a struct, without the tag, you need to use deriving via: Ñdata MyStruct = .. deriving (BorshSize, ToBorsh, FromBorsh) via Struct MyStruct¸NOTE: Doing so may have consequences for forwards compatibility: if a tag is present, additional constructors can be added without invalidating the encoding of existing constructors.!borshDecode from BorshSee #( for discussion of the generic instance.#borshEncoder to BorshòNOTE: The default generic encoder uses the Borsh encoding for enums, and will therefore use constructor tag; see £ for detailed discussion. Since the spec mandates the presence of that constructor tag, the generic encoder/decoder does not apply to types without constructors.&borsh2Size of the Borsh encoding, if known ahead of timeSee #( for discussion of the generic instance.'borshÆThe statically known size of encodings of values of a particular type. !"#$%&'()*+,-. Safe-Inferred")*/12589:;<=?ÀÁÂÃÄÅÌÑÔ×ÙÚÜãïó) !"#$%&'()*+,-."#- !.$%&'()*+,š       !"#$% & & '()**+ ,-./0123456789:;<=>?<@ABCDEFGHIJGKILMNOPQRSTUVWXYUZ[\]^_ ` a b c d e fCgh i j k l m n o p  qrst u v w x y z { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤¥¦§¨©!borsh-0.2.0-KtLog829lD9RR2Vy4tQ6OCodec.Borsh.IncrementalData.FixedSizeArray Codec.Borsh%Codec.Borsh.Internal.Util.BitwiseCast"Codec.Borsh.Internal.Util.ByteSwap$Codec.Borsh.Internal.Util.ByteStringCodec.Borsh.Incremental.LocatedCodec.Borsh.Incremental.MonadCodec.Borsh.Incremental.Decoder FromBorshCodec.Borsh.Internal.Util.SOPCodec.Borsh.EncodingCodec.Borsh.DecodingCodec.Borsh.ClassDeserialiseFailureDecoder liftDecoderdecodeLargeTokendecodeIncrementaldecodeIncremental_deserialiseByteStringMFixedSizeArraytoMArrayFixedSizeArraytoArrayfromList fromArray fromMArraynew$fVectorFixedSizeArraya$fTraversableFixedSizeArray$fMVectorMFixedSizeArraya$fShowFixedSizeArray$fEqFixedSizeArray$fOrdFixedSizeArray$fFunctorFixedSizeArray$fFoldableFixedSizeArrayEncoder runEncoder BorshSizeSum borshSizeSumStruct getStruct decodeBorshToBorsh encodeBorsh BorshSizeStaticBorshSize borshSizeSize SizeKnown SizeVariable KnownSize HasKnownSizeHasVariableSizeserialiseBorshdeserialiseBorshcastBits BitwiseCastLEfromLEByteSwapbyteSwapunLEpeekByteString splitAtEndbaseGHC.ListsplitAt lengthStrictbytestring-0.11.3.1Data.ByteStringlength lengthLazyData.ByteString.Lazy LocatedChunks LocatedChunkLocated ByteOffsetfromLocatedChunksaddChunk splitChunksLtoLocatedChunksIncrIDecode IDecodeDoneIDecodePartial IDecodeFailgetIncrrunIncrliftIncr needChunk decodeFail runIDecode DecodeDone DecodeFailDecodeNeedsData matchChunkDecodeLargeTokenDecodeIncrementalDecodeIncremental_GHC.STSTdecodeLittleEndian runDecoderrunWith processResultprocessLargeTokenprocessIncrementalprocessIncremental_ DecodeResultindices&vector-0.13.0.0-7U8pFThXyYFEKl1vrDAyiEData.Vector.Generic.BaseVectorencodeU8 encodeU16 encodeU32 encodeU64encodeI8 encodeI16 encodeI32 encodeI64 encodeF32 encodeF64 encodeU128 encodeI128 encodeString encodeArray encodeVec encodeOption encodeHashSet encodeHashMap encodeStruct encodeEnumencodeLazyByteStringencodeStrictByteString encodeChar encodeBooldecodeU8 decodeU16 decodeU32 decodeU64 decodeU128decodeI8 decodeI16 decodeI32 decodeI64 decodeI128 decodeF32 decodeF64 decodeString decodeArray decodeVec decodeOption decodeHashSet decodeHashMap decodeStruct decodeEnumdecodeLazyByteStringdecodeStrictByteString decodeChar decodeBoolSoK SumKnownSize ProdKnownAux ProdKnownSize