Results for “Result”
200 matching declarations
Use module:Std.List, kind:fn, or is:exact. Put a Pudu type after ::.
- Std.Result.all
&Array[Result[T, E]] -> Result[Array[T], E]Every success, or the first failure.
- Std.Result.andThen
Result[T, E] -> fn(T) -> Result[U, E] -> Result[U, E]The success transformed into another result, flattened.
- Std.Result.err
Result[T, E] -> Option[E]The failure if there was one.
- Std.Result.errOr
Result[T, E] -> E -> EThe failure, or a fallback when the operation succeeded.
- Std.Result.failures
&Array[Result[T, E]] -> Array[E]Every failure, with the successes dropped.
- Std.Result.flatten
Result[Result[T, E], E] -> Result[T, E]A nested result flattened by one level.
- Std.Result.fold
Result[T, E] -> fn(T) -> A -> fn(E) -> A -> AOne of two transformations, whichever side the result holds.
- Std.Result.holds
&Result[T, E] -> fn(T) -> Bool -> BoolWhether the operation succeeded and the predicate accepts the value.
- Std.Result.isErr
&Result[T, E] -> BoolWhether the operation failed.
- Std.Result.isOk
&Result[T, E] -> BoolWhether the operation succeeded.
- Std.Result.map
Result[T, E] -> fn(T) -> U -> Result[U, E]The success transformed, if there was one.
- Std.Result.map2
Result[T, E] -> Result[U, E] -> fn(T, U) -> V -> Result[V, E]Both successes combined, or the first failure.
- Std.Result.mapErr
Result[T, E] -> fn(E) -> F -> Result[T, F]The failure transformed, if there was one.
- Std.Result.ok
Result[T, E] -> Option[T]The value if there is one, forgetting why there was not.
- Std.Result.orElse
Result[T, E] -> Result[T, E] -> Result[T, E]The first result if it succeeded, otherwise the second.
- Std.Result.partition
&Array[Result[T, E]] -> (Array[T], Array[E])The two sides separated: every success, and every failure.
- Std.Result.require
Bool -> E -> Result[(), E]A success when a condition holds, and a named failure otherwise.
- Std.Result.successes
&Array[Result[T, E]] -> Array[T]Every success, with the failures dropped.
- Std.Result.swap
Result[T, E] -> Result[E, T]The sides exchanged, so a failure becomes a success and back.
- Std.Result.toArray
Result[T, E] -> Array[T]The value as an array of nought or one element.
- Std.Result.toOption
Result[T, E] -> Option[T]The success, or `None` when there was a failure, keeping neither.
- Std.Result.traverse
&Array[A] -> fn(A) -> Result[B, E] -> Result[Array[B], E]Every result transformed and collected, stopping at the first failure.
- Std.Result.unwrapOr
Result[T, E] -> T -> TThe value, or a fallback when the operation failed.
- Std.Result.unwrapOrElse
Result[T, E] -> fn(E) -> T -> TThe success, or a fallback computed from the failure.
- Std.Show.result
&Result[T, E] -> StrA result rendered as its success or its failure, with a marker for which.
- Std.Concurrent.mapResultBounded
&Array[T] -> Int -> fn(T) -> Result[U, E] -> Result[Result[Array[U], E], Std.Concurrent.ConcurrentError]Apply a fallible transform with bounded concurrency, returning the first error in input order.
- Std.RateLimiter.AcquireResult
Result of an acquisition attempt containing the updated limiter and success status.
- Std.RingBuffer.PopResult
The result of a successful pop operation containing the updated buffer and the dequeued item.
- Std.Tree.mapResult
&Std.Tree.Tree[A] -> fn(A) -> Result[B, E] -> Result[Std.Tree.Tree[B], E]Every value transformed, keeping the shape, where transforming may fail.
- Std.Tree.sequenceResult
&Std.Tree.Tree[Result[T, E]] -> Result[Std.Tree.Tree[T], E]A tree of results turned into a result holding a tree.
- Std.Tree.unfoldResult
S -> fn(S) -> Result[(T, Array[S]), E] -> Result[Std.Tree.Tree[T], E]A tree grown from a starting value, where growing may fail.
- Std.Varint.SignedVarintDecodeResult
Decoded signed 64-bit varint value and the number of bytes consumed.
- Std.Varint.VarintDecodeResult
Decoded unsigned 64-bit varint value and the number of bytes consumed.
- Std.App.Bind.binding
&Std.Http.Server.Route.Request -> &Array[Std.App.Bind.Wanted] -> Result[Std.App.Bind.Bound, Std.Http.Response]The bound values, or the refusal, in one step for the common handler.
- Std.App.Config.discover
&Array[(Str, Str)] -> Str -> Result[Std.App.Config.Config, Std.App.Config.ConfigError]The configuration a program gets when it does not say otherwise: its own
- Std.App.Config.fractional
&Std.App.Config.Config -> Str -> Result[Decimal, Std.App.Config.ConfigError]A setting as an exact fractional number.
- Std.App.Config.list
&Std.App.Config.Config -> Str -> Result[Array[Str], Std.App.Config.ConfigError]A setting as a list, written separated by commas.
- Std.App.Config.require
&Std.App.Config.Config -> Str -> Result[Str, Std.App.Config.ConfigError]A setting that must be there, for one the program cannot invent.
- Std.App.Config.text
&Std.App.Config.Config -> Str -> Result[Str, Std.App.Config.ConfigError]A setting as text.
- Std.App.Config.truth
&Std.App.Config.Config -> Str -> Result[Bool, Std.App.Config.ConfigError]A setting as a truth.
- Std.App.Config.whole
&Std.App.Config.Config -> Str -> Result[Int, Std.App.Config.ConfigError]A setting as a whole number.
- Std.App.Database.create
Str -> Int -> Result[Std.App.Database.Database, Std.Db.Driver.Error]Select a bundled connector from the connection-string scheme.
- Std.App.Database.execute
&Std.App.Database.Database -> Str -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run a statement that carries no values.
- Std.App.Database.fromConfig
&Std.App.Config.Config -> Str -> Int -> Result[Std.App.Database.Database, Std.Db.Driver.Error]Prepare a database from the connection string a setting names.
- Std.App.Database.fromConfigWith
Std.Db.Driver.Driver -> &Std.App.Config.Config -> Str -> Int -> Result[Std.App.Database.Database, Std.Db.Driver.Error]Prepare a database from a setting, using the given driver.
- Std.App.Database.migrate
&Std.App.Database.Database -> &Array[Std.Db.Migrate.Migration] -> Result[Int, Std.Db.Migrate.MigrationError]Bring the schema to what the program holds, through this database's driver.
- Std.App.Database.query
&Std.App.Database.Database -> Str -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]SQL and placeholders follow the selected driver; values are always separate.
- Std.App.Database.queryAll
&Std.App.Database.Database -> Str -> &Array[Std.Db.Driver.Value] -> fn(Std.Db.Driver.Rows, Int) -> Result[T, Std.Db.Row.RowError] -> Result[Array[T], Std.App.Database.QueryError]Every row a query answered, each read by the mapper.
- Std.App.Database.queryOne
&Std.App.Database.Database -> Str -> &Array[Std.Db.Driver.Value] -> fn(Std.Db.Driver.Rows, Int) -> Result[T, Std.Db.Row.RowError] -> Result[T, Std.App.Database.QueryError]The single row a query answered, or an error when it answered none or several.
- Std.App.Database.queryOptional
&Std.App.Database.Database -> Str -> &Array[Std.Db.Driver.Value] -> fn(Std.Db.Driver.Rows, Int) -> Result[T, Std.Db.Row.RowError] -> Result[Option[T], Std.App.Database.QueryError]The one row a query answered, or nothing.
- Std.App.Database.start
&Std.App.Database.Database -> Result[(), Std.Db.Driver.Error]Open the connections. Called by the stage rather than by a caller.
- Std.App.Database.stop
&Std.App.Database.Database -> Result[(), Std.Db.Driver.Error]Clear admission before closing; repeated stops are harmless.
- Std.App.Database.storeTarget
&Std.App.Database.Database -> Result[Std.Db.Store.Target, Std.Db.Driver.Error]This database as a store reads and writes it. A database that is not
- Std.App.Database.transaction
&Std.App.Database.Database -> fn(Std.Db.Driver.Tx) -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]The selected driver owns the connection for the complete action.
- Std.App.Database.withDriver
Std.Db.Driver.Driver -> Str -> Int -> Result[Std.App.Database.Database, Std.Db.Driver.Error]Prepare any developer-supplied connector; sockets open during stage startup.
- Std.App.Database.withDrivers
&Array[Std.Db.Driver.Driver] -> Str -> Int -> Result[Std.App.Database.Database, Std.Db.Driver.Error]Select a connector from an explicit set, without a process-global registry.
- Std.App.Jwt.decode
Str -> &Bytes -> &Std.App.Jwt.JwtValidation -> Int -> Result[Std.App.Jwt.JwtClaims, Std.App.Jwt.JwtError]Decodes and cryptographically verifies an RFC 7519 compact JWT against secret and validation rules.
- Std.App.Jwt.decodeUnverified
Str -> Result[Std.App.Jwt.JwtClaims, Std.App.Jwt.JwtError]Decodes claims without cryptographic signature verification.
- Std.App.Jwt.decodeWithKey
Str -> &Std.App.Jwt.PublicKey -> &Std.App.Jwt.JwtValidation -> Int -> Result[Std.App.Jwt.JwtClaims, Std.App.Jwt.JwtError]Verify a token signed with a provider's private key, and read its claims.
- Std.App.Otlp.send
&Std.App.Otlp.Exporter -> &Array[Std.App.Trace.Span] -> Result[Int, Std.App.Otlp.ExportError]Send finished spans to the collector.
- Std.App.Password.parse
Str -> Result[Std.App.Password.Stored, Std.App.Password.PasswordError]A stored form read back from that text.
- Std.App.Password.store
Str -> Result[Std.App.Password.Stored, Std.App.Password.PasswordError]A password in the form that proves it later without holding it.
- Std.App.Session.anonymous
Int -> Result[Std.App.Session.Session, Std.App.Session.SessionError]A session belonging to nobody in particular.
- Std.App.Session.signedIn
&Std.App.Session.Session -> Str -> Int -> Result[Std.App.Session.Session, Std.App.Session.SessionError]The session somebody has after signing in.
- Std.App.Session.signedOut
&Std.App.Session.Session -> Int -> Result[Std.App.Session.Session, Std.App.Session.SessionError]The session somebody has after signing out.
- Std.App.Session.started
Str -> Int -> Result[Std.App.Session.Session, Std.App.Session.SessionError]A session for somebody who has just proved who they are, with nothing
- Std.App.Stage.create
Str -> fn() -> Result[(), Str] -> fn() -> Result[(), Str] -> Std.App.Stage.StageA stage from its name and the two actions.
- Std.App.Totp.decodeBase32
Str -> Result[Bytes, Str]RFC 4648 Base32 decoder with whitespace stripping and case normalization.
- Std.App.Work.job
Str -> Std.App.Work.Due -> fn() -> Result[(), Str] -> Std.App.Work.JobA job from its parts.
- Std.App.once
Str -> fn() -> Result[(), Str] -> Std.App.Stage.StageA stage that has something to start and nothing to undo.
- Std.App.run
&Std.App.App -> Result[Int, Std.App.AppError]Start everything, serve until the work is finished, then stop everything.
- Std.App.serve
Str -> &Std.Http.Server.Route.Router -> Result[Int, Std.App.AppError]A name and a router, and a service is running.
- Std.App.stage
Str -> fn() -> Result[(), Str] -> fn() -> Result[(), Str] -> Std.App.Stage.StageA stage from its two halves.
- Std.App.web
Str -> &Std.Http.Server.Route.Router -> Result[Std.App.App, Std.App.AppError]The same application, built and not run.
- Std.Archive.Tar.readArchive
&Bytes -> Result[Array[Std.Archive.Tar.TarEntry], Std.Archive.Tar.TarError]Decodes all TarEntries from a POSIX USTAR archive byte stream.
- Std.Archive.Zip.readArchive
&Bytes -> Result[Array[Std.Archive.Zip.Entry], Std.Archive.Zip.ZipError]Read an archive.
- Std.Archive.Zip.writeArchive
&Array[Std.Archive.Zip.Entry] -> Result[Bytes, Std.Archive.Zip.ZipError]Write an archive.
- Std.Args.fromCommandLine
&Std.Args.Spec -> Result[Std.Args.Args, Std.Args.ArgsError]Read the command line this program was given.
- Std.Args.numberChecked
&Std.Args.Args -> Str -> Result[Option[Int], Std.Args.ArgsError]The value an option was given as a number, refusing text that is not one.
- Std.Args.parse
&Std.Args.Spec -> &Array[Str] -> Result[Std.Args.Args, Std.Args.ArgsError]Read arguments against a spec, in one pass.
- Std.Audio.Device.closeStream
&Std.Audio.Device.Stream -> Bool -> Int -> Result[(), Std.Audio.Device.DeviceError]Release the stream exactly once, optionally sounding every queued frame.
- Std.Audio.Device.openStream
&Std.Audio.Device.StreamPlan -> Result[Std.Audio.Device.Stream, Std.Audio.Device.DeviceError]Open the default output and return the format accepted by its queue.
- Std.Audio.Device.pause
&Std.Audio.Device.Stream -> Result[(), Std.Audio.Device.DeviceError]Stop consuming queued frames while keeping them and the stream's position.
- Std.Audio.Device.plan
Int -> Int -> Int -> Result[Std.Audio.Device.Plan, Std.Audio.Device.DeviceError]Admit two to eight preallocated buffers of 16 through 4,096 frames each.
- Std.Audio.Device.play
&Std.Audio.Device.Plan -> &Std.Audio.Pcm -> Result[Std.Audio.Device.Playback, Std.Audio.Device.DeviceError]Play one admitted interleaved signed-16 clip and await exact completion.
- Std.Audio.Device.resume
&Std.Audio.Device.Stream -> Result[(), Std.Audio.Device.DeviceError]Continue consuming queued frames from where a pause left them.
- Std.Audio.Device.setVolume
&Std.Audio.Device.Stream -> Float64 -> Result[(), Std.Audio.Device.DeviceError]Set linear output volume from silence through unity.
- Std.Audio.Device.snapshot
&Std.Audio.Device.Stream -> Result[Std.Audio.Device.StreamSnapshot, Std.Audio.Device.DeviceError]Read one coherent telemetry sample and audio-master clock.
- Std.Audio.Device.streamPlan
Std.Audio.Format -> Int -> Int -> Int -> Result[Std.Audio.Device.StreamPlan, Std.Audio.Device.DeviceError]Admit a persistent stream request before touching a device.
- Std.Audio.Device.write
&Std.Audio.Device.Stream -> &Std.Audio.Pcm -> Result[Int, Std.Audio.Device.DeviceError]Enqueue one exact PCM chunk with bounded backpressure.
- Std.Audio.Graph.render
&Std.Audio.Graph.Node -> &Std.Audio.Format -> Int -> Int -> Result[Std.Audio.Pcm, Std.Audio.Graph.GraphError]Exactly `frames` frames of a graph starting at frame `start`.
- Std.Audio.append
&Std.Audio.Pcm -> &Std.Audio.Pcm -> Result[Std.Audio.Pcm, Std.Audio.AudioError]One stream followed by another of the same format.
- Std.Audio.decodeWav
&Bytes -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Audio from a 16-bit PCM WAV document, within the default sample budget.
- Std.Audio.decodeWavWithin
&Bytes -> Int -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Audio from a 16-bit PCM WAV document holding at most `maxSamples` samples.
- Std.Audio.downmix
&Std.Audio.Pcm -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Mono audio averaging every channel of each frame, rounded half away from zero.
- Std.Audio.encodeWav
&Std.Audio.Pcm -> Result[Bytes, Std.Audio.AudioError]A canonical 16-bit PCM WAV document.
- Std.Audio.format
Int -> Int -> Result[Std.Audio.Format, Std.Audio.AudioError]A format with a sample rate from 8,000 to 384,000 and one to eight channels.
- Std.Audio.framesAt
&Std.Audio.Format -> Int -> Int -> Result[Int, Std.Audio.AudioError]The frame at a time given in seconds as a fraction, rounded down.
- Std.Audio.fromSamples
&Std.Audio.Format -> Array[Int] -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Audio from interleaved samples, refusing a partial frame or a sample that
- Std.Audio.gain
&Std.Audio.Pcm -> Int -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Audio scaled by a Q15 gain, where 32,768 is unity.
- Std.Audio.mix
&Std.Audio.Pcm -> &Std.Audio.Pcm -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Two streams summed sample by sample, saturating to 16 bits.
- Std.Audio.remap
&Std.Audio.Pcm -> &Array[Int] -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Audio whose channel `k` is the source's channel `order[k]`, so channels are
- Std.Audio.resample
&Std.Audio.Pcm -> Int -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Audio at another sample rate by linear interpolation in exact arithmetic.
- Std.Audio.seconds
&Std.Audio.Format -> Int -> Result[Std.Audio.Seconds, Std.Audio.AudioError]The exact duration of a number of frames, as a reduced fraction of a second.
- Std.Audio.silence
&Std.Audio.Format -> Int -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Silent audio of a whole number of frames.
- Std.Audio.slice
&Std.Audio.Pcm -> Int -> Int -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Exactly `frames` frames starting at `start`, silent past the end.
- Std.Audio.upmix
&Std.Audio.Pcm -> Int -> Result[Std.Audio.Pcm, Std.Audio.AudioError]Mono audio copied into every channel of a wider format.
- Std.BitSet.fromBlocks
&Map[UInt64, UInt64] -> Result[Std.BitSet.BitSet, UInt64]Validate block addresses and omit empty blocks.
- Std.Bytes.Cursor.peek
&Std.Bytes.Cursor.Cursor -> Result[Option[UInt8], Std.Bytes.Cursor.CursorError]Observe the next byte without consuming it; EOF is `None`.
- Std.Bytes.Cursor.remaining
&Std.Bytes.Cursor.Cursor -> Result[Int, Std.Bytes.Cursor.CursorError]Validate the cursor before subtracting its position from the input length.
- Std.Bytes.Cursor.seek
&Std.Bytes.Cursor.Cursor -> Int -> Result[Std.Bytes.Cursor.Cursor, Std.Bytes.Cursor.CursorError]Move to an absolute byte position, including the end of input.
- Std.Bytes.Cursor.skip
&Std.Bytes.Cursor.Cursor -> Int -> Result[Std.Bytes.Cursor.Cursor, Std.Bytes.Cursor.CursorError]Skip bytes using the same bounds contract as a read.
- Std.Bytes.Cursor.take
&Std.Bytes.Cursor.Cursor -> Int -> Result[(Bytes, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]Read a shared view. A failed read leaves the original cursor usable.
- Std.Bytes.Cursor.u16Be
&Std.Bytes.Cursor.Cursor -> Result[(UInt16, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]Read an unsigned integer in the byte order named by the function.
- Std.Bytes.Cursor.u16Le
&Std.Bytes.Cursor.Cursor -> Result[(UInt16, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]The next two bytes as an unsigned number, least significant first.
- Std.Bytes.Cursor.u32Be
&Std.Bytes.Cursor.Cursor -> Result[(UInt32, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]The next four bytes as an unsigned number, most significant first.
- Std.Bytes.Cursor.u32Le
&Std.Bytes.Cursor.Cursor -> Result[(UInt32, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]The next four bytes as an unsigned number, least significant first.
- Std.Bytes.Cursor.u64Be
&Std.Bytes.Cursor.Cursor -> Result[(UInt64, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]The next eight bytes as an unsigned number, most significant first.
- Std.Bytes.Cursor.u64Le
&Std.Bytes.Cursor.Cursor -> Result[(UInt64, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]The next eight bytes as an unsigned number, least significant first.
- Std.Bytes.Cursor.u8
&Std.Bytes.Cursor.Cursor -> Result[(UInt8, Std.Bytes.Cursor.Cursor), Std.Bytes.Cursor.CursorError]Read one octet without converting it through text.
- Std.Bytes.decodeBase64
Str -> Result[Bytes, Std.Bytes.BytesError]The bytes base64 text spells, or why it spells none.
- Std.Bytes.decodeBase64Url
Str -> Result[Bytes, Std.Bytes.BytesError]The bytes URL-alphabet base64 spells, padded or not.
- Std.Bytes.decodeHex
Str -> Result[Bytes, Std.Bytes.BytesError]The bytes hexadecimal text spells, or why it spells none.
- Std.Bytes.getBytes
&Bytes -> Int -> Result[(Bytes, Bytes), Std.Bytes.BytesError]The next bytes as their own sequence, and the rest of the input.
- Std.Bytes.getText
&Bytes -> Int -> Result[(Str, Bytes), Std.Bytes.BytesError]The next bytes decoded as text, and the rest of the input.
- Std.Bytes.getU16Be
&Bytes -> Result[(UInt16, Bytes), Std.Bytes.BytesError]Two bytes as a number, most significant first, and the rest of the input.
- Std.Bytes.getU16Le
&Bytes -> Result[(UInt16, Bytes), Std.Bytes.BytesError]Two bytes as a number, least significant first, and the rest of the input.
- Std.Bytes.getU32Be
&Bytes -> Result[(UInt32, Bytes), Std.Bytes.BytesError]Four bytes as a number, most significant first, and the rest of the input.
- Std.Bytes.getU32Le
&Bytes -> Result[(UInt32, Bytes), Std.Bytes.BytesError]Four bytes as a number, least significant first, and the rest of the input.
- Std.Bytes.getU64Be
&Bytes -> Result[(UInt64, Bytes), Std.Bytes.BytesError]Eight bytes as a number, most significant first, and the rest of the input.
- Std.Bytes.getU64Le
&Bytes -> Result[(UInt64, Bytes), Std.Bytes.BytesError]Eight bytes as a number, least significant first, and the rest of the input.
- Std.Bytes.getU8
&Bytes -> Result[(UInt8, Bytes), Std.Bytes.BytesError]One byte, and the rest of the input.
- Std.Bytes.toText
&Bytes -> Result[Str, Std.Bytes.BytesError]The text a sequence encodes, or the reason it is not text.
- Std.Channel.close
&Std.Channel.Channel[T] -> Result[(), Std.Channel.ChannelError]Say that nothing more will be sent, so every receiver's loop can end.
- Std.Channel.drain
&Std.Channel.Channel[T] -> Result[Array[T], Std.Channel.ChannelError]Every value still to come, in the order it was sent.
- Std.Channel.fold
&Std.Channel.Channel[T] -> A -> fn(A, T) -> A -> Result[A, Std.Channel.ChannelError]Take values until the channel closes, combining them into one value.
- Std.Channel.pending
&Std.Channel.Channel[T] -> Result[Int, Std.Channel.ChannelError]How many values are waiting.
- Std.Channel.receive
&Std.Channel.Channel[T] -> Result[Option[T], Std.Channel.ChannelError]Take the next value, waiting while the channel is empty.
- Std.Channel.send
&Std.Channel.Channel[T] -> T -> Result[(), Std.Channel.ChannelError]Put a value in, waiting while the channel is full.
- Std.Compress.Gzip.compressChecked
&Bytes -> &Std.Compress.Gzip.GzipConfig -> Result[Bytes, Std.Compress.Gzip.GzipError]Compress bytes using the configured zlib level; checked form exposes host failure.
- Std.Compress.Gzip.decompress
&Bytes -> Result[Bytes, Std.Compress.Gzip.GzipError]Decode one gzip member with a default 64 MiB decompressed output limit.
- Std.Compress.Gzip.decompressText
&Bytes -> Result[Str, Std.Compress.Gzip.GzipError]Decompresses an RFC 1952 GZIP stream and decodes the payload as UTF-8 text.
- Std.Compress.Gzip.decompressWithin
&Bytes -> Int -> Result[Bytes, Std.Compress.Gzip.GzipError]Enforce output admission during inflation, including highly compressible inputs.
- Std.Concurrent.forEachBounded
&Array[T] -> Int -> fn(T) -> () -> Result[(), Std.Concurrent.ConcurrentError]Apply an action to values with bounded concurrency, without implicit retries.
- Std.Concurrent.join
&Std.Concurrent.Task -> Result[(), Std.Concurrent.ConcurrentError]Wait for a thread to finish, and report what it said if it failed.
- Std.Concurrent.joinAll
&Array[Std.Concurrent.Task] -> Result[(), Std.Concurrent.ConcurrentError]Wait for every thread, in the order they were started.
- Std.Concurrent.mapBounded
&Array[T] -> Int -> fn(T) -> U -> Result[Array[U], Std.Concurrent.ConcurrentError]Map values with bounded concurrency, preserving input order and typed failures.
- Std.Concurrent.parallel
&Array[fn() -> ()] -> Result[(), Std.Concurrent.ConcurrentError]Run every action at once and wait for all of them.
- Std.Concurrent.parallelBounded
&Array[fn() -> ()] -> Int -> Result[(), Std.Concurrent.ConcurrentError]Run a batch with bounded workers; each action is claimed at most once.
- Std.Concurrent.sleep
Int -> Result[(), Std.Concurrent.ConcurrentError]Wait, without holding the machine while waiting.
- Std.Concurrent.start
fn() -> () -> Result[Std.Concurrent.Task, Std.Concurrent.ConcurrentError]Start an action on a thread of its own.
- Std.Crypto.newKey
Result[Bytes, Str]A fresh key of the length `seal` needs, from the operating system's secure
- Std.Crypto.newNonce
Result[Bytes, Str]A fresh nonce of the length `seal` needs, from the same secure source.
- Std.Csv.foldRows
Str -> T -> fn(T, Array[Str]) -> T -> Result[T, Std.Csv.CsvReadError]Combine every row of a comma-separated file into one value, holding one
- Std.Csv.foldRowsWith
Str -> Str -> T -> fn(T, Array[Str]) -> T -> Result[T, Std.Csv.CsvReadError]The same, for a file whose fields are separated by something else.
- Std.Csv.parse
Str -> Result[Array[Array[Str]], Std.Csv.CsvError]Every row of a comma-separated text, fields already unquoted.
- Std.Csv.parseTable
Str -> Result[Std.Csv.Table, Std.Csv.CsvError]A table whose first row names its columns.
- Std.Csv.parseWith
Str -> Str -> Result[Array[Array[Str]], Std.Csv.CsvError]The same, for a text whose fields are separated by something else.
- Std.Db.ConnectionString.connect
Str -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Open a real PostgreSQL session from a connection URI.
- Std.Db.ConnectionString.parse
Str -> Result[Std.Db.Session.Config, Std.Db.Session.DbError]Parse connection settings without connecting or including secrets in errors.
- Std.Db.ConnectionString.pool
Str -> Int -> Result[Std.Db.Pool, Std.Db.Session.DbError]Open a bounded pool from a connection URI.
- Std.Db.Driver.ask
&Std.Db.Driver.Tx -> Str -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Ask a transaction's own connection, rather than the pool.
- Std.Db.Driver.close
&Std.Db.Driver.Client -> Result[(), Std.Db.Driver.Error]Close a client and the connections it holds.
- Std.Db.Driver.connect
&Array[Std.Db.Driver.Driver] -> Str -> Int -> Result[Std.Db.Driver.Client, Std.Db.Driver.Error]Open a client for a connection string, using the first driver that knows the scheme.
- Std.Db.Driver.execute
&Std.Db.Driver.Client -> Str -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run a statement that carries no values.
- Std.Db.Driver.query
&Std.Db.Driver.Client -> Str -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run a statement with values bound to its placeholders.
- Std.Db.Driver.run
&Std.Db.Driver.Tx -> Str -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run a statement on the connection a transaction holds.
- Std.Db.Driver.select
&Array[Std.Db.Driver.Driver] -> Str -> Result[Std.Db.Driver.Driver, Std.Db.Driver.Error]Select exactly one driver without exposing connection-string contents in errors.
- Std.Db.Driver.transaction
&Std.Db.Driver.Client -> fn(Std.Db.Driver.Tx) -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run an action inside a transaction, on one connection, whichever backend
- Std.Db.Migrate.apply
&Std.Db.Driver.Client -> &Std.Db.Driver.Driver -> &Array[Std.Db.Migrate.Migration] -> Result[Int, Std.Db.Migrate.MigrationError]Bring the schema to what the program expects, through any driver.
- Std.Db.Migrate.migrate
Std.Db.Session.Connection -> &Array[Std.Db.Migrate.Migration] -> Result[(Int, Std.Db.Session.Connection), Std.Db.Migrate.MigrationError]Bring the schema to what the program expects, on one PostgreSQL session.
- Std.Db.Migrate.plan
&Array[Std.Db.Migrate.Migration] -> &Array[Std.Db.Migrate.Applied] -> Result[Std.Db.Migrate.Plan, Std.Db.Migrate.MigrationError]What should happen next, decided without a database.
- Std.Db.Migrate.recordOf
Std.Db.Session.Connection -> Result[(Array[Std.Db.Migrate.Applied], Std.Db.Session.Connection), Std.Db.Session.DbError]The record a database holds.
- Std.Db.Postgres.connect
Str -> Int -> Result[Std.Db.Driver.Client, Std.Db.Driver.Error]Open a client on a PostgreSQL connection string.
- Std.Db.Protocol.authenticationKind
&Bytes -> Result[Int, Std.Db.Protocol.ProtocolError]What kind of authentication the server asked for, read from the message
- Std.Db.Protocol.messageSize
&Bytes -> Result[Int, Std.Db.Protocol.ProtocolError]Validate the length before a streaming reader allocates or requests a body.
- Std.Db.Protocol.readCString
&Bytes -> Result[(Str, Bytes), Std.Db.Protocol.ProtocolError]The text at the front of a payload, and what follows it.
- Std.Db.Protocol.readDataRow
&Bytes -> Result[Array[Option[Str]], Std.Db.Protocol.ProtocolError]SQL NULL has one explicit sentinel; invalid or truncated text is not absent.
- Std.Db.Protocol.readMessage
&Bytes -> Result[(Std.Db.Protocol.Message, Bytes), Std.Db.Protocol.ProtocolError]Read one complete message, preserving any following frames.
- Std.Db.Protocol.readRowDescription
&Bytes -> Result[Array[Std.Db.Protocol.Column], Std.Db.Protocol.ProtocolError]The columns a row description names.
- Std.Db.Query.Shape.qualifiedName
Str -> Result[Str, Std.Db.Query.QueryError]A name that may carry the table it belongs to.
- Std.Db.Query.Shape.select
&Std.Db.Query.Shape.Select -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A whole query as a statement, or the first thing wrong with it.
- Std.Db.Query.also
&Std.Db.Query.Statement -> Str -> Str -> Std.Db.Driver.Value -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A further condition that must also hold.
- Std.Db.Query.counting
Str -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]How many rows a table holds.
- Std.Db.Query.deleteFrom
Str -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]Rows removed from a table.
- Std.Db.Query.either
&Std.Db.Query.Statement -> Str -> Str -> Std.Db.Driver.Value -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A further condition where either may hold.
- Std.Db.Query.from
Str -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]Everything from a table.
- Std.Db.Query.insert
Str -> &Array[Str] -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A row added to a table, from the columns and the values that fill them.
- Std.Db.Query.matching
&Std.Db.Query.Statement -> Str -> Str -> Std.Db.Driver.Value -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A condition on a column, with the value travelling beside the statement.
- Std.Db.Query.matchingMissing
&Std.Db.Query.Statement -> Str -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A condition that a column holds nothing.
- Std.Db.Query.matchingOneOf
&Std.Db.Query.Statement -> Str -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A condition that a column is one of several values.
- Std.Db.Query.name
Str -> Result[Str, Std.Db.Query.QueryError]A name, admitted only when it is one.
- Std.Db.Query.oneOf
Str -> &Array[Str] -> Result[Str, Std.Db.Query.QueryError]A name chosen from a list the program wrote.
- Std.Db.Query.operator
Str -> Result[Str, Std.Db.Query.QueryError]An operator, admitted only when it is one.
- Std.Db.Query.orderBy
&Std.Db.Query.Statement -> Str -> Bool -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]The order rows come back in.
- Std.Db.Query.qualifiedName
Str -> Result[Str, Std.Db.Query.QueryError]A name that may carry the table it belongs to.
- Std.Db.Query.returning
&Std.Db.Query.Statement -> &Array[Str] -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A statement that answers with the rows it changed.
- Std.Db.Query.selecting
&Array[Str] -> Str -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]Named columns from a table.
- Std.Db.Query.update
Str -> &Array[Str] -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]Columns of a table set to new values.
- Std.Db.Query.withQuery
Str -> &Std.Db.Query.Statement -> &Std.Db.Query.Statement -> Result[Std.Db.Query.Statement, Std.Db.Query.QueryError]A named result the rest of a statement reads from.
