From 87f139044703ed938eded6ff059a2f0bad36fa15 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Fri, 2 Aug 2024 20:57:35 +0000 Subject: [PATCH] deploy: c1a2774ef8c739baef988fad06a9c028e9a415d4 --- pr/2583/docs/help.html | 2 +- .../base32/enum.HexOrBase32ParseError.html | 4 +- pr/2583/docs/iroh/base/base32/fn.fmt.html | 2 +- .../docs/iroh/base/base32/fn.fmt_append.html | 2 +- .../docs/iroh/base/base32/fn.fmt_short.html | 2 +- .../docs/iroh/base/base32/fn.parse_array.html | 2 +- .../base32/fn.parse_array_hex_or_base32.html | 2 +- .../docs/iroh/base/base32/fn.parse_vec.html | 2 +- pr/2583/docs/iroh/base/base32/index.html | 2 +- .../iroh/base/base32/struct.DecodeError.html | 2 +- .../docs/iroh/base/hash/enum.BlobFormat.html | 24 ++--- pr/2583/docs/iroh/base/hash/index.html | 2 +- pr/2583/docs/iroh/base/hash/struct.Hash.html | 38 ++++---- .../iroh/base/hash/struct.HashAndFormat.html | 30 +++--- pr/2583/docs/iroh/base/index.html | 2 +- .../iroh/base/key/enum.KeyParsingError.html | 4 +- pr/2583/docs/iroh/base/key/index.html | 2 +- .../docs/iroh/base/key/struct.PublicKey.html | 32 +++---- .../docs/iroh/base/key/struct.SecretKey.html | 26 ++--- .../iroh/base/key/struct.SharedSecret.html | 8 +- pr/2583/docs/iroh/base/key/type.NodeId.html | 2 +- .../base/node_addr/enum.AddrInfoOptions.html | 12 +-- pr/2583/docs/iroh/base/node_addr/index.html | 2 +- .../iroh/base/node_addr/struct.AddrInfo.html | 18 ++-- .../iroh/base/node_addr/struct.NodeAddr.html | 28 +++--- .../iroh/base/node_addr/struct.RelayUrl.html | 20 ++-- pr/2583/docs/iroh/base/rpc/index.html | 2 +- .../docs/iroh/base/rpc/struct.RpcError.html | 6 +- .../docs/iroh/base/rpc/type.RpcResult.html | 2 +- pr/2583/docs/iroh/base/ticket/enum.Error.html | 4 +- pr/2583/docs/iroh/base/ticket/index.html | 2 +- .../iroh/base/ticket/struct.BlobTicket.html | 22 ++--- .../iroh/base/ticket/struct.NodeTicket.html | 14 +-- .../docs/iroh/base/ticket/trait.Ticket.html | 14 +-- .../iroh/blobs/constant.IROH_BLOCK_SIZE.html | 2 +- .../blobs/downloader/enum.DownloadError.html | 4 +- .../blobs/downloader/enum.FailureAction.html | 4 +- pr/2583/docs/iroh/blobs/downloader/index.html | 2 +- .../downloader/struct.ConcurrencyLimits.html | 4 +- .../downloader/struct.DownloadHandle.html | 4 +- .../blobs/downloader/struct.DownloadKind.html | 14 +-- .../downloader/struct.DownloadRequest.html | 8 +- .../blobs/downloader/struct.Downloader.html | 14 +-- .../blobs/downloader/struct.IntentId.html | 12 +-- .../blobs/downloader/struct.RetryConfig.html | 4 +- .../iroh/blobs/downloader/trait.Dialer.html | 12 +-- .../iroh/blobs/downloader/trait.Getter.html | 6 +- pr/2583/docs/iroh/blobs/enum.BlobFormat.html | 24 ++--- .../blobs/export/enum.ExportProgress.html | 6 +- pr/2583/docs/iroh/blobs/export/fn.export.html | 2 +- .../iroh/blobs/export/fn.export_blob.html | 2 +- .../blobs/export/fn.export_collection.html | 2 +- pr/2583/docs/iroh/blobs/export/index.html | 2 +- .../iroh/blobs/format/collection/index.html | 2 +- .../format/collection/struct.Collection.html | 40 ++++---- .../format/collection/trait.SimpleStore.html | 4 +- pr/2583/docs/iroh/blobs/format/index.html | 2 +- .../docs/iroh/blobs/get/db/enum.BlobId.html | 18 ++-- .../docs/iroh/blobs/get/db/enum.BlobInfo.html | 16 ++-- .../blobs/get/db/enum.DownloadProgress.html | 6 +- .../docs/iroh/blobs/get/db/fn.blob_info.html | 2 +- .../docs/iroh/blobs/get/db/fn.get_to_db.html | 2 +- .../iroh/blobs/get/db/fn.valid_ranges.html | 2 +- pr/2583/docs/iroh/blobs/get/db/index.html | 2 +- .../iroh/blobs/get/enum.GetResponseError.html | 4 +- .../iroh/blobs/get/error/enum.GetError.html | 4 +- pr/2583/docs/iroh/blobs/get/error/index.html | 2 +- .../get/fsm/enum.AtBlobHeaderNextError.html | 4 +- .../blobs/get/fsm/enum.BlobContentNext.html | 6 +- .../blobs/get/fsm/enum.ConnectedNext.html | 4 +- .../get/fsm/enum.ConnectedNextError.html | 4 +- .../iroh/blobs/get/fsm/enum.DecodeError.html | 4 +- .../iroh/blobs/get/fsm/enum.EndBlobNext.html | 4 +- pr/2583/docs/iroh/blobs/get/fsm/fn.start.html | 2 +- pr/2583/docs/iroh/blobs/get/fsm/index.html | 2 +- .../blobs/get/fsm/struct.AtBlobContent.html | 24 ++--- .../blobs/get/fsm/struct.AtBlobHeader.html | 22 ++--- .../iroh/blobs/get/fsm/struct.AtClosing.html | 6 +- .../blobs/get/fsm/struct.AtConnected.html | 6 +- .../iroh/blobs/get/fsm/struct.AtEndBlob.html | 6 +- .../iroh/blobs/get/fsm/struct.AtInitial.html | 8 +- .../blobs/get/fsm/struct.AtStartChild.html | 12 +-- .../blobs/get/fsm/struct.AtStartRoot.html | 12 +-- pr/2583/docs/iroh/blobs/get/index.html | 2 +- .../blobs/get/progress/enum.BlobProgress.html | 10 +- .../docs/iroh/blobs/get/progress/index.html | 2 +- .../blobs/get/progress/struct.BlobState.html | 12 +-- .../get/progress/struct.TransferState.html | 20 ++-- .../blobs/get/progress/type.ProgressId.html | 2 +- .../blobs/get/request/fn.get_chunk_probe.html | 2 +- .../request/fn.get_hash_seq_and_sizes.html | 2 +- .../get/request/fn.get_unverified_size.html | 2 +- .../get/request/fn.get_verified_size.html | 2 +- .../request/fn.random_hash_seq_ranges.html | 2 +- .../docs/iroh/blobs/get/request/index.html | 2 +- pr/2583/docs/iroh/blobs/get/struct.Stats.html | 12 +-- .../iroh/blobs/hashseq/fn.parse_hash_seq.html | 2 +- pr/2583/docs/iroh/blobs/hashseq/index.html | 2 +- .../iroh/blobs/hashseq/struct.HashSeq.html | 20 ++-- .../blobs/hashseq/struct.HashSeqIter.html | 4 +- .../blobs/hashseq/struct.HashSeqStream.html | 8 +- pr/2583/docs/iroh/blobs/index.html | 2 +- pr/2583/docs/iroh/blobs/metrics/index.html | 2 +- .../iroh/blobs/metrics/struct.Metrics.html | 30 +++--- .../iroh/blobs/protocol/constant.ALPN.html | 2 +- .../protocol/constant.MAX_MESSAGE_SIZE.html | 2 +- .../docs/iroh/blobs/protocol/enum.Closed.html | 10 +- .../iroh/blobs/protocol/enum.Request.html | 10 +- pr/2583/docs/iroh/blobs/protocol/index.html | 2 +- .../blobs/protocol/struct.GetRequest.html | 20 ++-- .../struct.NonEmptyRequestRangeSpecIter.html | 4 +- .../iroh/blobs/protocol/struct.RangeSpec.html | 24 ++--- .../blobs/protocol/struct.RangeSpecSeq.html | 28 +++--- .../protocol/struct.UnknownErrorCode.html | 4 +- .../iroh/blobs/provider/enum.AddProgress.html | 6 +- .../docs/iroh/blobs/provider/enum.Event.html | 4 +- .../iroh/blobs/provider/enum.SentStatus.html | 6 +- .../blobs/provider/fn.handle_connection.html | 2 +- .../iroh/blobs/provider/fn.handle_get.html | 2 +- .../iroh/blobs/provider/fn.read_request.html | 2 +- .../iroh/blobs/provider/fn.send_blob.html | 2 +- .../provider/fn.transfer_collection.html | 2 +- pr/2583/docs/iroh/blobs/provider/index.html | 2 +- .../blobs/provider/struct.ResponseWriter.html | 6 +- .../blobs/provider/struct.TransferStats.html | 4 +- .../blobs/provider/trait.EventSender.html | 4 +- .../store/bao_tree/blake3/struct.Hash.html | 2 +- .../store/bao_tree/io/enum.DecodeError.html | 2 +- .../io/fsm/trait.AsyncSliceWriter.html | 4 +- .../store/bao_tree/io/sync/trait.ReadAt.html | 2 +- .../store/bao_tree/io/sync/trait.Size.html | 2 +- .../store/bao_tree/io/sync/trait.WriteAt.html | 2 +- .../iroh/blobs/store/enum.BaoBlobSize.html | 14 +-- .../store/enum.ConsistencyCheckProgress.html | 6 +- .../iroh/blobs/store/enum.EntryStatus.html | 6 +- pr/2583/docs/iroh/blobs/store/enum.Event.html | 6 +- .../iroh/blobs/store/enum.ExportFormat.html | 6 +- .../iroh/blobs/store/enum.ExportMode.html | 10 +- .../iroh/blobs/store/enum.ExportProgress.html | 4 +- .../iroh/blobs/store/enum.GcMarkEvent.html | 4 +- .../iroh/blobs/store/enum.GcSweepEvent.html | 4 +- .../iroh/blobs/store/enum.ImportMode.html | 6 +- .../iroh/blobs/store/enum.ImportProgress.html | 4 +- .../iroh/blobs/store/enum.ReportLevel.html | 14 +-- .../blobs/store/enum.ValidateProgress.html | 6 +- pr/2583/docs/iroh/blobs/store/fs/index.html | 2 +- .../blobs/store/fs/struct.BatchOptions.html | 4 +- .../blobs/store/fs/struct.FlatStorePaths.html | 4 +- .../blobs/store/fs/struct.InlineOptions.html | 8 +- .../iroh/blobs/store/fs/struct.Options.html | 4 +- .../blobs/store/fs/struct.PathOptions.html | 4 +- .../iroh/blobs/store/fs/struct.Store.html | 54 +++++------ .../docs/iroh/blobs/store/fs/type.Entry.html | 2 +- pr/2583/docs/iroh/blobs/store/index.html | 2 +- pr/2583/docs/iroh/blobs/store/mem/index.html | 2 +- .../iroh/blobs/store/mem/struct.Entry.html | 4 +- .../iroh/blobs/store/mem/struct.Store.html | 34 +++---- .../iroh/blobs/store/readonly_mem/index.html | 2 +- .../store/readonly_mem/struct.Entry.html | 4 +- .../store/readonly_mem/struct.Store.html | 44 ++++----- .../blobs/store/trait.BaoBatchWriter.html | 12 +-- pr/2583/docs/iroh/blobs/store/trait.Map.html | 8 +- .../docs/iroh/blobs/store/trait.MapEntry.html | 14 +-- .../iroh/blobs/store/trait.MapEntryMut.html | 6 +- .../docs/iroh/blobs/store/trait.MapMut.html | 16 ++-- .../iroh/blobs/store/trait.ReadableStore.html | 16 ++-- .../docs/iroh/blobs/store/trait.Store.html | 30 +++--- .../docs/iroh/blobs/store/type.DbIter.html | 2 +- .../blobs/store/type.ExportProgressCb.html | 2 +- pr/2583/docs/iroh/blobs/struct.Hash.html | 38 ++++---- .../docs/iroh/blobs/struct.HashAndFormat.html | 30 +++--- pr/2583/docs/iroh/blobs/struct.Tag.html | 24 ++--- pr/2583/docs/iroh/blobs/struct.TempTag.html | 14 +-- .../docs/iroh/blobs/util/enum.MemOrFile.html | 26 ++--- .../iroh/blobs/util/enum.SetTagOption.html | 14 +-- .../docs/iroh/blobs/util/fn.total_bytes.html | 2 +- pr/2583/docs/iroh/blobs/util/index.html | 2 +- pr/2583/docs/iroh/blobs/util/io/index.html | 2 +- .../blobs/util/io/struct.TrackingReader.html | 14 +-- .../blobs/util/io/struct.TrackingWriter.html | 20 ++-- .../blobs/util/local_pool/enum.PanicMode.html | 6 +- .../util/local_pool/enum.SpawnError.html | 4 +- .../iroh/blobs/util/local_pool/index.html | 2 +- .../blobs/util/local_pool/struct.Config.html | 4 +- .../util/local_pool/struct.LocalPool.html | 28 +++--- .../local_pool/struct.LocalPoolHandle.html | 16 ++-- .../blobs/util/local_pool/struct.Run.html | 8 +- .../util/progress/enum.ProgressSendError.html | 4 +- .../docs/iroh/blobs/util/progress/index.html | 2 +- .../struct.AsyncChannelProgressSender.html | 20 ++-- .../progress/struct.BoxedProgressSender.html | 12 +-- .../struct.FallibleProgressSliceWriter.html | 16 ++-- .../progress/struct.FlumeProgressSender.html | 20 ++-- .../progress/struct.IgnoreProgressSender.html | 10 +- .../progress/struct.ProgressSliceWriter.html | 16 ++-- .../util/progress/struct.WithFilterMap.html | 14 +-- .../blobs/util/progress/struct.WithMap.html | 14 +-- .../util/progress/trait.IdGenerator.html | 14 +-- .../util/progress/trait.ProgressSender.html | 40 ++++---- .../progress/type.ProgressSendResult.html | 2 +- .../iroh/blobs/util/struct.SparseMemFile.html | 14 +-- pr/2583/docs/iroh/blobs/util/struct.Tag.html | 24 ++--- .../docs/iroh/blobs/util/struct.TempTag.html | 14 +-- .../iroh/blobs/util/trait.TagCounter.html | 10 +- .../docs/iroh/blobs/util/trait.TagDrop.html | 6 +- .../client/gossip/enum.SubscribeResponse.html | 6 +- .../client/gossip/enum.SubscribeUpdate.html | 6 +- .../iroh/docs/metrics/struct.Metrics.html | 42 ++++----- pr/2583/docs/iroh/docs/struct.AuthorId.html | 2 +- .../iroh/docs/struct.AuthorPublicKey.html | 2 +- pr/2583/docs/iroh/docs/struct.DocTicket.html | 2 +- .../docs/iroh/docs/struct.NamespaceId.html | 2 +- .../iroh/docs/struct.NamespacePublicKey.html | 2 +- .../iroh/gossip/dispatcher/enum.Command.html | 6 +- .../iroh/gossip/dispatcher/enum.Event.html | 6 +- .../gossip/dispatcher/enum.GossipEvent.html | 14 +-- .../docs/iroh/gossip/dispatcher/index.html | 2 +- .../dispatcher/struct.GossipDispatcher.html | 8 +- .../gossip/dispatcher/struct.Message.html | 14 +-- .../dispatcher/struct.SubscribeOptions.html | 6 +- pr/2583/docs/iroh/gossip/index.html | 2 +- pr/2583/docs/iroh/gossip/metrics/index.html | 2 +- .../iroh/gossip/metrics/struct.Metrics.html | 42 ++++----- .../iroh/gossip/net/constant.GOSSIP_ALPN.html | 2 +- pr/2583/docs/iroh/gossip/net/index.html | 2 +- .../docs/iroh/gossip/net/struct.Gossip.html | 24 ++--- .../iroh/gossip/net/struct.JoinTopicFut.html | 4 +- .../docs/iroh/gossip/net/type.Command.html | 2 +- pr/2583/docs/iroh/gossip/net/type.Event.html | 2 +- .../docs/iroh/gossip/net/util/fn.read_lp.html | 2 +- .../iroh/gossip/net/util/fn.read_message.html | 2 +- .../gossip/net/util/fn.write_message.html | 2 +- pr/2583/docs/iroh/gossip/net/util/index.html | 2 +- .../iroh/gossip/net/util/struct.Timers.html | 12 +-- .../docs/iroh/gossip/proto/enum.Command.html | 8 +- .../iroh/gossip/proto/enum.DeliveryScope.html | 16 ++-- .../docs/iroh/gossip/proto/enum.Event.html | 30 +++--- .../docs/iroh/gossip/proto/enum.InEvent.html | 8 +- .../docs/iroh/gossip/proto/enum.OutEvent.html | 8 +- .../docs/iroh/gossip/proto/enum.Scope.html | 14 +-- pr/2583/docs/iroh/gossip/proto/index.html | 2 +- .../iroh/gossip/proto/state/enum.InEvent.html | 8 +- .../gossip/proto/state/enum.MessageKind.html | 4 +- .../gossip/proto/state/enum.OutEvent.html | 8 +- .../docs/iroh/gossip/proto/state/index.html | 2 +- .../gossip/proto/state/struct.Message.html | 20 ++-- .../iroh/gossip/proto/state/struct.State.html | 24 ++--- .../iroh/gossip/proto/state/struct.Timer.html | 8 +- .../gossip/proto/state/struct.TopicId.html | 24 ++--- .../docs/iroh/gossip/proto/struct.Config.html | 4 +- .../iroh/gossip/proto/struct.Message.html | 20 ++-- .../iroh/gossip/proto/struct.PeerData.html | 16 ++-- .../docs/iroh/gossip/proto/struct.State.html | 24 ++--- .../docs/iroh/gossip/proto/struct.Timer.html | 8 +- .../iroh/gossip/proto/struct.TopicId.html | 24 ++--- .../constant.DEFAULT_MAX_MESSAGE_SIZE.html | 2 +- .../iroh/gossip/proto/topic/enum.Command.html | 8 +- .../iroh/gossip/proto/topic/enum.Event.html | 30 +++--- .../iroh/gossip/proto/topic/enum.InEvent.html | 8 +- .../iroh/gossip/proto/topic/enum.Message.html | 24 ++--- .../gossip/proto/topic/enum.OutEvent.html | 12 +-- .../iroh/gossip/proto/topic/enum.Timer.html | 14 +-- .../docs/iroh/gossip/proto/topic/index.html | 2 +- .../gossip/proto/topic/struct.Config.html | 4 +- .../iroh/gossip/proto/topic/struct.State.html | 24 ++--- .../iroh/gossip/proto/topic/struct.Stats.html | 4 +- .../iroh/gossip/proto/topic/trait.IO.html | 10 +- pr/2583/docs/iroh/gossip/proto/trait.IO.html | 10 +- .../iroh/gossip/proto/trait.PeerIdentity.html | 4 +- .../docs/iroh/gossip/proto/util/index.html | 2 +- .../proto/util/struct.TimeBoundCache.html | 26 ++--- .../gossip/proto/util/struct.TimerMap.html | 20 ++-- pr/2583/docs/iroh/metrics/struct.Metrics.html | 24 ++--- .../docs/iroh/net/dialer/struct.Dialer.html | 2 +- .../net/endpoint/enum.ConnectionError.html | 2 +- .../iroh/net/endpoint/enum.ReadError.html | 2 +- .../iroh/net/endpoint/enum.WriteError.html | 2 +- .../iroh/net/endpoint/struct.AddrInfo.html | 18 ++-- .../iroh/net/endpoint/struct.NodeAddr.html | 28 +++--- .../docs/iroh/net/endpoint/struct.VarInt.html | 4 +- .../iroh/net/key/enum.KeyParsingError.html | 4 +- pr/2583/docs/iroh/net/key/index.html | 2 +- .../docs/iroh/net/key/struct.PublicKey.html | 32 +++---- .../docs/iroh/net/key/struct.SecretKey.html | 26 ++--- .../iroh/net/key/struct.SharedSecret.html | 8 +- pr/2583/docs/iroh/net/key/type.NodeId.html | 2 +- .../net/metrics/struct.MagicsockMetrics.html | 94 +++++++++---------- .../net/metrics/struct.NetcheckMetrics.html | 18 ++-- .../net/metrics/struct.PortmapMetrics.html | 26 ++--- .../iroh/net/metrics/struct.RelayMetrics.html | 80 ++++++++-------- .../iroh/net/netcheck/struct.Metrics.html | 18 ++-- .../iroh/net/portmapper/struct.Metrics.html | 26 ++--- .../iroh/net/relay/server/struct.Metrics.html | 80 ++++++++-------- .../docs/iroh/net/relay/struct.RelayUrl.html | 20 ++-- pr/2583/docs/iroh/net/struct.AddrInfo.html | 18 ++-- pr/2583/docs/iroh/net/struct.NodeAddr.html | 28 +++--- .../iroh/net/ticket/struct.NodeTicket.html | 14 +-- pr/2583/docs/iroh/net/type.NodeId.html | 2 +- .../downloader/struct.DownloadRequest.html | 2 +- .../downloader/struct.Downloader.html | 2 +- .../iroh_blobs/downloader/trait.Dialer.html | 12 +-- pr/2583/docs/iroh_blobs/enum.BlobFormat.html | 22 ++--- .../export/enum.ExportProgress.html | 4 +- .../get/db/enum.DownloadProgress.html | 4 +- .../iroh_blobs/metrics/struct.Metrics.html | 28 +++--- .../iroh_blobs/provider/enum.AddProgress.html | 4 +- .../store/enum.ConsistencyCheckProgress.html | 4 +- .../store/enum.ValidateProgress.html | 4 +- pr/2583/docs/iroh_blobs/struct.Hash.html | 34 +++---- .../docs/iroh_blobs/struct.HashAndFormat.html | 28 +++--- .../docs/iroh_docs/engine/struct.Engine.html | 2 +- pr/2583/docs/iroh_docs/struct.AuthorId.html | 2 +- .../iroh_docs/struct.AuthorPublicKey.html | 2 +- .../docs/iroh_docs/struct.NamespaceId.html | 2 +- .../iroh_docs/struct.NamespacePublicKey.html | 2 +- .../dispatcher/enum.GossipEvent.html | 10 +- .../dispatcher/struct.GossipDispatcher.html | 2 +- .../dispatcher/struct.Message.html | 4 +- .../dispatcher/struct.SubscribeOptions.html | 4 +- .../iroh_gossip/metrics/struct.Metrics.html | 40 ++++---- .../docs/iroh_gossip/net/struct.Gossip.html | 8 +- .../docs/iroh_gossip/net/type.Command.html | 6 +- pr/2583/docs/iroh_gossip/net/type.Event.html | 14 +-- .../iroh_gossip/net/util/fn.read_message.html | 2 +- .../net/util/fn.write_message.html | 2 +- .../iroh_gossip/proto/topic/enum.Event.html | 2 +- pr/2583/docs/settings.html | 2 +- .../trait.impl/core/convert/trait.From.js | 2 +- .../iroh_metrics/core/trait.Metric.js | 6 +- .../iroh/gossip/proto/enum.Command.js | 2 +- .../type.impl/iroh/gossip/proto/enum.Event.js | 2 +- .../iroh/net/key/struct.PublicKey.js | 2 +- pr/2583/docs/type.impl/std/primitive.array.js | 2 +- 333 files changed, 1717 insertions(+), 1717 deletions(-) diff --git a/pr/2583/docs/help.html b/pr/2583/docs/help.html index 49d451041f..bb0a3f1cfe 100644 --- a/pr/2583/docs/help.html +++ b/pr/2583/docs/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/base32/enum.HexOrBase32ParseError.html b/pr/2583/docs/iroh/base/base32/enum.HexOrBase32ParseError.html index 46888a8668..6b879abf38 100644 --- a/pr/2583/docs/iroh/base/base32/enum.HexOrBase32ParseError.html +++ b/pr/2583/docs/iroh/base/base32/enum.HexOrBase32ParseError.html @@ -1,10 +1,10 @@ -HexOrBase32ParseError in iroh::base::base32 - Rust

Enum iroh::base::base32::HexOrBase32ParseError

source ·
pub enum HexOrBase32ParseError {
+HexOrBase32ParseError in iroh::base::base32 - Rust

Enum iroh::base::base32::HexOrBase32ParseError

pub enum HexOrBase32ParseError {
     Base32(DecodeError),
     Hex(FromHexError),
 }
Expand description

Error when parsing a hex or base32 string.

Variants§

§

Base32(DecodeError)

Error when decoding the base32.

§

Hex(FromHexError)

Error when decoding the public key.

-

Trait Implementations§

source§

impl Debug for HexOrBase32ParseError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for HexOrBase32ParseError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for HexOrBase32ParseError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<DecodeError> for HexOrBase32ParseError

source§

fn from(source: DecodeError) -> HexOrBase32ParseError

Converts to this type from the input type.
source§

impl From<FromHexError> for HexOrBase32ParseError

source§

fn from(source: FromHexError) -> HexOrBase32ParseError

Converts to this type from the input type.
source§

impl From<HexOrBase32ParseError> for KeyParsingError

source§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for HexOrBase32ParseError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for HexOrBase32ParseError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for HexOrBase32ParseError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<DecodeError> for HexOrBase32ParseError

§

fn from(source: DecodeError) -> HexOrBase32ParseError

Converts to this type from the input type.
§

impl From<FromHexError> for HexOrBase32ParseError

§

fn from(source: FromHexError) -> HexOrBase32ParseError

Converts to this type from the input type.
§

impl From<HexOrBase32ParseError> for KeyParsingError

§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/base32/fn.fmt.html b/pr/2583/docs/iroh/base/base32/fn.fmt.html index c6d288f1d9..053047d466 100644 --- a/pr/2583/docs/iroh/base/base32/fn.fmt.html +++ b/pr/2583/docs/iroh/base/base32/fn.fmt.html @@ -1,2 +1,2 @@ -fmt in iroh::base::base32 - Rust

Function iroh::base::base32::fmt

source ·
pub fn fmt(bytes: impl AsRef<[u8]>) -> String
Expand description

Convert to a base32 string

+fmt in iroh::base::base32 - Rust

Function iroh::base::base32::fmt

pub fn fmt(bytes: impl AsRef<[u8]>) -> String
Expand description

Convert to a base32 string

\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/base32/fn.fmt_append.html b/pr/2583/docs/iroh/base/base32/fn.fmt_append.html index fca5b3ad25..aab7c1289a 100644 --- a/pr/2583/docs/iroh/base/base32/fn.fmt_append.html +++ b/pr/2583/docs/iroh/base/base32/fn.fmt_append.html @@ -1,2 +1,2 @@ -fmt_append in iroh::base::base32 - Rust

Function iroh::base::base32::fmt_append

source ·
pub fn fmt_append(bytes: impl AsRef<[u8]>, out: &mut String)
Expand description

Convert to a base32 string and append out out

+fmt_append in iroh::base::base32 - Rust

Function iroh::base::base32::fmt_append

pub fn fmt_append(bytes: impl AsRef<[u8]>, out: &mut String)
Expand description

Convert to a base32 string and append out out

\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/base32/fn.fmt_short.html b/pr/2583/docs/iroh/base/base32/fn.fmt_short.html index 68ea75ee67..7499a1e1ba 100644 --- a/pr/2583/docs/iroh/base/base32/fn.fmt_short.html +++ b/pr/2583/docs/iroh/base/base32/fn.fmt_short.html @@ -1,2 +1,2 @@ -fmt_short in iroh::base::base32 - Rust

Function iroh::base::base32::fmt_short

source ·
pub fn fmt_short(bytes: impl AsRef<[u8]>) -> String
Expand description

Convert to a base32 string limited to the first 10 bytes

+fmt_short in iroh::base::base32 - Rust

Function iroh::base::base32::fmt_short

pub fn fmt_short(bytes: impl AsRef<[u8]>) -> String
Expand description

Convert to a base32 string limited to the first 10 bytes

\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/base32/fn.parse_array.html b/pr/2583/docs/iroh/base/base32/fn.parse_array.html index a2468acc08..610cdcea89 100644 --- a/pr/2583/docs/iroh/base/base32/fn.parse_array.html +++ b/pr/2583/docs/iroh/base/base32/fn.parse_array.html @@ -1,2 +1,2 @@ -parse_array in iroh::base::base32 - Rust

Function iroh::base::base32::parse_array

source ·
pub fn parse_array<const N: usize>(input: &str) -> Result<[u8; N], DecodeError>
Expand description

Parse from a base32 string into a byte array

+parse_array in iroh::base::base32 - Rust

Function iroh::base::base32::parse_array

pub fn parse_array<const N: usize>(input: &str) -> Result<[u8; N], DecodeError>
Expand description

Parse from a base32 string into a byte array

\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/base32/fn.parse_array_hex_or_base32.html b/pr/2583/docs/iroh/base/base32/fn.parse_array_hex_or_base32.html index b6f36e4946..5b157638e8 100644 --- a/pr/2583/docs/iroh/base/base32/fn.parse_array_hex_or_base32.html +++ b/pr/2583/docs/iroh/base/base32/fn.parse_array_hex_or_base32.html @@ -1,4 +1,4 @@ -parse_array_hex_or_base32 in iroh::base::base32 - Rust

Function iroh::base::base32::parse_array_hex_or_base32

source ·
pub fn parse_array_hex_or_base32<const LEN: usize>(
+parse_array_hex_or_base32 in iroh::base::base32 - Rust

Function iroh::base::base32::parse_array_hex_or_base32

pub fn parse_array_hex_or_base32<const LEN: usize>(
     input: &str
 ) -> Result<[u8; LEN], HexOrBase32ParseError>
Expand description

Parse a fixed length hex or base32 string into a byte array

For fixed length we can know the encoding by the length of the string.

diff --git a/pr/2583/docs/iroh/base/base32/fn.parse_vec.html b/pr/2583/docs/iroh/base/base32/fn.parse_vec.html index 9cbc58698f..496edd94cb 100644 --- a/pr/2583/docs/iroh/base/base32/fn.parse_vec.html +++ b/pr/2583/docs/iroh/base/base32/fn.parse_vec.html @@ -1,2 +1,2 @@ -parse_vec in iroh::base::base32 - Rust

Function iroh::base::base32::parse_vec

source ·
pub fn parse_vec(input: &str) -> Result<Vec<u8>, DecodeError>
Expand description

Decode form a base32 string to a vector of bytes

+parse_vec in iroh::base::base32 - Rust

Function iroh::base::base32::parse_vec

pub fn parse_vec(input: &str) -> Result<Vec<u8>, DecodeError>
Expand description

Decode form a base32 string to a vector of bytes

\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/base32/index.html b/pr/2583/docs/iroh/base/base32/index.html index 2533009384..1a490ee2cc 100644 --- a/pr/2583/docs/iroh/base/base32/index.html +++ b/pr/2583/docs/iroh/base/base32/index.html @@ -1 +1 @@ -iroh::base::base32 - Rust

Module iroh::base::base32

source ·

Structs§

Enums§

Functions§

  • Convert to a base32 string
  • Convert to a base32 string and append out out
  • Convert to a base32 string limited to the first 10 bytes
  • Parse from a base32 string into a byte array
  • Parse a fixed length hex or base32 string into a byte array
  • Decode form a base32 string to a vector of bytes
\ No newline at end of file +iroh::base::base32 - Rust

Module iroh::base::base32

Structs§

Enums§

Functions§

  • Convert to a base32 string
  • Convert to a base32 string and append out out
  • Convert to a base32 string limited to the first 10 bytes
  • Parse from a base32 string into a byte array
  • Parse a fixed length hex or base32 string into a byte array
  • Decode form a base32 string to a vector of bytes
\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/base32/struct.DecodeError.html b/pr/2583/docs/iroh/base/base32/struct.DecodeError.html index a00e6589db..b3e25b30ca 100644 --- a/pr/2583/docs/iroh/base/base32/struct.DecodeError.html +++ b/pr/2583/docs/iroh/base/base32/struct.DecodeError.html @@ -5,7 +5,7 @@

Fields§

§position: usize

Error position

This position is always a valid input position and represents the first encountered error.

§kind: DecodeKind

Error kind

-

Trait Implementations§

§

impl Clone for DecodeError

§

fn clone(&self) -> DecodeError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for DecodeError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<DecodeError> for Error

source§

fn from(source: DecodeError) -> Error

Converts to this type from the input type.
source§

impl From<DecodeError> for HexOrBase32ParseError

source§

fn from(source: DecodeError) -> HexOrBase32ParseError

Converts to this type from the input type.
§

impl PartialEq for DecodeError

§

fn eq(&self, other: &DecodeError) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for DecodeError

§

fn clone(&self) -> DecodeError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for DecodeError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<DecodeError> for Error

§

fn from(source: DecodeError) -> Error

Converts to this type from the input type.
§

impl From<DecodeError> for HexOrBase32ParseError

§

fn from(source: DecodeError) -> HexOrBase32ParseError

Converts to this type from the input type.
§

impl PartialEq for DecodeError

§

fn eq(&self, other: &DecodeError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for DecodeError

§

impl Eq for DecodeError

§

impl StructuralPartialEq for DecodeError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/hash/enum.BlobFormat.html b/pr/2583/docs/iroh/base/hash/enum.BlobFormat.html index 524fa56682..d562a3ab5f 100644 --- a/pr/2583/docs/iroh/base/hash/enum.BlobFormat.html +++ b/pr/2583/docs/iroh/base/hash/enum.BlobFormat.html @@ -1,30 +1,30 @@ -BlobFormat in iroh::base::hash - Rust

Enum iroh::base::hash::BlobFormat

source ·
pub enum BlobFormat {
+BlobFormat in iroh::base::hash - Rust

Enum iroh::base::hash::BlobFormat

pub enum BlobFormat {
     Raw,
     HashSeq,
 }
Expand description

A format identifier

Variants§

§

Raw

Raw blob

§

HashSeq

A sequence of BLAKE3 hashes

-

Implementations§

source§

impl BlobFormat

source

pub const fn is_raw(&self) -> bool

Is raw format

-
source

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

-

Trait Implementations§

source§

impl Clone for BlobFormat

source§

fn clone(&self) -> BlobFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlobFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for BlobFormat

source§

fn default() -> BlobFormat

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlobFormat

Implementations§

§

impl BlobFormat

pub const fn is_raw(&self) -> bool

Is raw format

+

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

+

Trait Implementations§

§

impl Clone for BlobFormat

§

fn clone(&self) -> BlobFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for BlobFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for BlobFormat

§

fn default() -> BlobFormat

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for BlobFormat

§

fn deserialize<__D>( __deserializer: __D ) -> Result<BlobFormat, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for BlobFormat

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Hash for BlobFormat

source§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for BlobFormat

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for BlobFormat

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl MaxSize for BlobFormat

source§

const POSTCARD_MAX_SIZE: usize = 1usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for BlobFormat

source§

fn cmp(&self, other: &BlobFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl MaxSize for BlobFormat

§

const POSTCARD_MAX_SIZE: usize = 1usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for BlobFormat

§

fn cmp(&self, other: &BlobFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for BlobFormat

source§

fn eq(&self, other: &BlobFormat) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for BlobFormat

§

fn eq(&self, other: &BlobFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for BlobFormat

source§

fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for BlobFormat

§

fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for BlobFormat

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for BlobFormat

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlobFormat

source§

impl Eq for BlobFormat

source§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for BlobFormat

§

impl Eq for BlobFormat

§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where @@ -149,7 +149,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/base/hash/index.html b/pr/2583/docs/iroh/base/hash/index.html index 47bb37ddb1..26ea62f9c6 100644 --- a/pr/2583/docs/iroh/base/hash/index.html +++ b/pr/2583/docs/iroh/base/hash/index.html @@ -1,2 +1,2 @@ -iroh::base::hash - Rust

Module iroh::base::hash

source ·
Expand description

The blake3 hash used in Iroh.

+iroh::base::hash - Rust

Module iroh::base::hash

Expand description

The blake3 hash used in Iroh.

Structs§

Enums§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/hash/struct.Hash.html b/pr/2583/docs/iroh/base/hash/struct.Hash.html index 7ebbfc1866..a3daea6640 100644 --- a/pr/2583/docs/iroh/base/hash/struct.Hash.html +++ b/pr/2583/docs/iroh/base/hash/struct.Hash.html @@ -1,37 +1,37 @@ -Hash in iroh::base::hash - Rust

Struct iroh::base::hash::Hash

source ·
pub struct Hash(/* private fields */);
Expand description

Hash type used throughout.

-

Implementations§

source§

impl Hash

source

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

-
source

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

-
source

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

-
source

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

-
source

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +Hash in iroh::base::hash - Rust

Struct iroh::base::hash::Hash

pub struct Hash(/* private fields */);
Expand description

Hash type used throughout.

+

Implementations§

§

impl Hash

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

+

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

+

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

+

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

+

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

+

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the hash.

-

Trait Implementations§

source§

impl AsRef<[u8]> for Hash

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<[u8]> for Hash

source§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
source§

impl Borrow<[u8; 32]> for Hash

source§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
source§

impl Clone for Hash

source§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Hash

Trait Implementations§

§

impl AsRef<[u8]> for Hash

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Borrow<[u8]> for Hash

§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
§

impl Borrow<[u8; 32]> for Hash

§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
§

impl Clone for Hash

§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Hash

§

fn deserialize<D>( deserializer: D ) -> Result<Hash, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&[u8; 32]> for Hash

source§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<[u8; 32]> for Hash

source§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for [u8; 32]

source§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

fn from_iter<T>(iter: T) -> HashSeq
where - T: IntoIterator<Item = Hash>,

Creates a value from an iterator. Read more
source§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for Hash

source§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<&[u8; 32]> for Hash

§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<[u8; 32]> for Hash

§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl FromIterator<Hash> for HashSeq

§

fn from_iter<T>(iter: T) -> HashSeq
where + T: IntoIterator<Item = Hash>,

Creates a value from an iterator. Read more
§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for Hash

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Key for Hash

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl MaxSize for Hash

source§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for Hash

source§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Key for Hash

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl MaxSize for Hash

§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for Hash

§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Hash

source§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Hash

§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Hash

source§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Hash

§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for Hash

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for Hash

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where Hash: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <Hash as Value>::SelfType<'b> ) -> <Hash as Value>::AsBytes<'a>
where 'b: 'a, - Hash: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Copy for Hash

source§

impl Eq for Hash

source§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where + Hash: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for Hash

§

impl Eq for Hash

§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where @@ -166,7 +166,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/base/hash/struct.HashAndFormat.html b/pr/2583/docs/iroh/base/hash/struct.HashAndFormat.html index c9f931ba2a..ec96265ff9 100644 --- a/pr/2583/docs/iroh/base/hash/struct.HashAndFormat.html +++ b/pr/2583/docs/iroh/base/hash/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh::base::hash - Rust

Struct iroh::base::hash::HashAndFormat

source ·
pub struct HashAndFormat {
+HashAndFormat in iroh::base::hash - Rust

Struct iroh::base::hash::HashAndFormat

pub struct HashAndFormat {
     pub hash: Hash,
     pub format: BlobFormat,
 }
Expand description

A hash and format pair

Fields§

§hash: Hash

The hash

§format: BlobFormat

The format

-

Implementations§

source§

impl HashAndFormat

source

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

-
source

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

-
source

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

-

Trait Implementations§

source§

impl Clone for HashAndFormat

source§

fn clone(&self) -> HashAndFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for HashAndFormat

Implementations§

§

impl HashAndFormat

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

+

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

+

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

+

Trait Implementations§

§

impl Clone for HashAndFormat

§

fn clone(&self) -> HashAndFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for HashAndFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for HashAndFormat

§

fn deserialize<D>( deserializer: D ) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<DownloadKind> for HashAndFormat

source§

fn from(value: DownloadKind) -> HashAndFormat

Converts to this type from the input type.
source§

impl From<HashAndFormat> for DownloadKind

source§

fn from(value: HashAndFormat) -> DownloadKind

Converts to this type from the input type.
source§

impl From<HashAndFormat> for HashAndFormat

source§

fn from(value: HashAndFormat) -> HashAndFormat

Converts to this type from the input type.
source§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for HashAndFormat

source§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for HashAndFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<DownloadKind> for HashAndFormat

§

fn from(value: DownloadKind) -> HashAndFormat

Converts to this type from the input type.
§

impl From<HashAndFormat> for DownloadKind

§

fn from(value: HashAndFormat) -> DownloadKind

Converts to this type from the input type.
§

impl From<HashAndFormat> for HashAndFormat

§

fn from(value: HashAndFormat) -> HashAndFormat

Converts to this type from the input type.
§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for HashAndFormat

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl MaxSize for HashAndFormat

source§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for HashAndFormat

source§

fn cmp(&self, other: &HashAndFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl MaxSize for HashAndFormat

§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for HashAndFormat

§

fn cmp(&self, other: &HashAndFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for HashAndFormat

source§

fn eq(&self, other: &HashAndFormat) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for HashAndFormat

§

fn eq(&self, other: &HashAndFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for HashAndFormat

source§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for HashAndFormat

§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for HashAndFormat

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for HashAndFormat

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where HashAndFormat: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <HashAndFormat as Value>::SelfType<'b> ) -> <HashAndFormat as Value>::AsBytes<'a>
where 'b: 'a, - HashAndFormat: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Copy for HashAndFormat

source§

impl Eq for HashAndFormat

source§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + HashAndFormat: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for HashAndFormat

§

impl Eq for HashAndFormat

§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where @@ -156,7 +156,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/base/index.html b/pr/2583/docs/iroh/base/index.html index f38d220e57..7fdc88ed89 100644 --- a/pr/2583/docs/iroh/base/index.html +++ b/pr/2583/docs/iroh/base/index.html @@ -1,2 +1,2 @@ -iroh::base - Rust

Crate iroh::base

source ·
Expand description

Base types and utilities for Iroh

+iroh::base - Rust

Crate iroh::base

Expand description

Base types and utilities for Iroh

Modules§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/key/enum.KeyParsingError.html b/pr/2583/docs/iroh/base/key/enum.KeyParsingError.html index af7f3cb244..e8e4c72a42 100644 --- a/pr/2583/docs/iroh/base/key/enum.KeyParsingError.html +++ b/pr/2583/docs/iroh/base/key/enum.KeyParsingError.html @@ -1,10 +1,10 @@ -KeyParsingError in iroh::base::key - Rust

Enum iroh::base::key::KeyParsingError

source ·
pub enum KeyParsingError {
+KeyParsingError in iroh::base::key - Rust

Enum iroh::base::key::KeyParsingError

pub enum KeyParsingError {
     Base32(HexOrBase32ParseError),
     Key(Error),
 }
Expand description

Error when deserialising a PublicKey or a SecretKey.

Variants§

§

Base32(HexOrBase32ParseError)

Error when decoding the base32.

§

Key(Error)

Error when decoding the public key.

-

Trait Implementations§

source§

impl Debug for KeyParsingError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for KeyParsingError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for KeyParsingError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for KeyParsingError

source§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
source§

impl From<HexOrBase32ParseError> for KeyParsingError

source§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for KeyParsingError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for KeyParsingError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for KeyParsingError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<Error> for KeyParsingError

§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
§

impl From<HexOrBase32ParseError> for KeyParsingError

§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/key/index.html b/pr/2583/docs/iroh/base/key/index.html index 1bb1d68a50..236a1353bb 100644 --- a/pr/2583/docs/iroh/base/key/index.html +++ b/pr/2583/docs/iroh/base/key/index.html @@ -1,2 +1,2 @@ -iroh::base::key - Rust

Module iroh::base::key

source ·
Expand description

Cryptographic key handling for iroh-net.

+iroh::base::key - Rust

Module iroh::base::key

Expand description

Cryptographic key handling for iroh-net.

Structs§

Enums§

Constants§

Type Aliases§

  • The identifier for a node in the (iroh) network.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/key/struct.PublicKey.html b/pr/2583/docs/iroh/base/key/struct.PublicKey.html index b3f592330f..c5e1a328e3 100644 --- a/pr/2583/docs/iroh/base/key/struct.PublicKey.html +++ b/pr/2583/docs/iroh/base/key/struct.PublicKey.html @@ -1,45 +1,45 @@ -PublicKey in iroh::base::key - Rust

Struct iroh::base::key::PublicKey

source ·
pub struct PublicKey(/* private fields */);
Expand description

A public key.

+PublicKey in iroh::base::key - Rust

Struct iroh::base::key::PublicKey

pub struct PublicKey(/* private fields */);
Expand description

A public key.

The key itself is just a 32 byte array, but a key has associated crypto information that is cached for performance reasons.

The cache item will be refreshed every time a crypto operation is performed, or when a key is deserialised or created from a byte array.

Serialisation or creation from a byte array is cheap if the key is already in the cache, but expensive if it is not.

-

Implementations§

source§

impl PublicKey

source

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

-
source

pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

Construct a PublicKey from a slice of bytes.

+

Implementations§

§

impl PublicKey

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

+

pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

Construct a PublicKey from a slice of bytes.

§Warning

This will return a [SignatureError] if the bytes passed into this method do not represent a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes. See [VerifyingKey::from_bytes] for details.

-
source

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this secret key’s public key.

+

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this secret key’s public key.

§Return

Returns Ok(()) if the signature is valid, and Err otherwise.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the key.

-

Trait Implementations§

source§

impl AsRef<[u8]> for PublicKey

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for PublicKey

source§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PublicKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PublicKey

Trait Implementations§

§

impl AsRef<[u8]> for PublicKey

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Clone for PublicKey

§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for PublicKey

§

fn deserialize<D>( deserializer: D ) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for PublicKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<VerifyingKey> for PublicKey

source§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
source§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

+ D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
§

impl From<VerifyingKey> for PublicKey

§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

Display is capable of serialising this format.

-
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for PublicKey

source§

fn hash<H>(&self, state: &mut H)
where +
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more

§

impl Hash for PublicKey

§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for PublicKey

source§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for PublicKey

§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for PublicKey

source§

fn eq(&self, other: &PublicKey) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for PublicKey

§

fn eq(&self, other: &PublicKey) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for PublicKey

source§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for PublicKey

§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for PublicKey

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for PublicKey

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( bytes: &[u8] -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
source§

impl TryFrom<&[u8; 32]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
§

impl TryFrom<&[u8; 32]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( bytes: &[u8; 32] -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
source§

impl Copy for PublicKey

source§

impl Eq for PublicKey

source§

impl StructuralPartialEq for PublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
§

impl Copy for PublicKey

§

impl Eq for PublicKey

§

impl StructuralPartialEq for PublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where @@ -174,7 +174,7 @@
§Return
S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/base/key/struct.SecretKey.html b/pr/2583/docs/iroh/base/key/struct.SecretKey.html index 865bc76aac..3f30f4b7b5 100644 --- a/pr/2583/docs/iroh/base/key/struct.SecretKey.html +++ b/pr/2583/docs/iroh/base/key/struct.SecretKey.html @@ -1,24 +1,24 @@ -SecretKey in iroh::base::key - Rust

Struct iroh::base::key::SecretKey

source ·
pub struct SecretKey { /* private fields */ }
Expand description

A secret key.

-

Implementations§

source§

impl SecretKey

source

pub fn shared(&self, other: &PublicKey) -> SharedSecret

Returns the shared key for communication between this key and other.

-
source§

impl SecretKey

source

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

-
source

pub fn generate() -> SecretKey

Generate a new SecretKey with the default randomness generator.

-
source

pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKey
where +SecretKey in iroh::base::key - Rust

Struct iroh::base::key::SecretKey

pub struct SecretKey { /* private fields */ }
Expand description

A secret key.

+

Implementations§

§

impl SecretKey

pub fn shared(&self, other: &PublicKey) -> SharedSecret

Returns the shared key for communication between this key and other.

+
§

impl SecretKey

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

+

pub fn generate() -> SecretKey

Generate a new SecretKey with the default randomness generator.

+

pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKey
where R: CryptoRngCore + ?Sized,

Generate a new SecretKey with a randomness generator.

-
source

pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

Serialise this key to OpenSSH format.

-
source

pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
where +

pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

Serialise this key to OpenSSH format.

+

pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
where T: AsRef<[u8]>,

Deserialise this key from OpenSSH format.

-
source

pub fn sign(&self, msg: &[u8]) -> Signature

Sign the given message and return a digital signature

-
source

pub fn to_bytes(&self) -> [u8; 32]

Convert this to the bytes representing the secret part. +

pub fn sign(&self, msg: &[u8]) -> Signature

Sign the given message and return a digital signature

+

pub fn to_bytes(&self) -> [u8; 32]

Convert this to the bytes representing the secret part. The public part can always be recovered.

-
source

pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

Create a secret key from its byte representation.

-

Trait Implementations§

source§

impl Clone for SecretKey

source§

fn clone(&self) -> SecretKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SecretKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SecretKey

pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

Create a secret key from its byte representation.

+

Trait Implementations§

§

impl Clone for SecretKey

§

fn clone(&self) -> SecretKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SecretKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SecretKey

§

fn deserialize<D>( deserializer: D ) -> Result<SecretKey, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for SecretKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<[u8; 32]> for SecretKey

source§

fn from(value: [u8; 32]) -> SecretKey

Converts to this type from the input type.
source§

impl From<SigningKey> for SecretKey

source§

fn from(secret: SigningKey) -> SecretKey

Converts to this type from the input type.
source§

impl FromStr for SecretKey

§

type Err = KeyParsingError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Serialize for SecretKey

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for SecretKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<[u8; 32]> for SecretKey

§

fn from(value: [u8; 32]) -> SecretKey

Converts to this type from the input type.
§

impl From<SigningKey> for SecretKey

§

fn from(secret: SigningKey) -> SecretKey

Converts to this type from the input type.
§

impl FromStr for SecretKey

§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Serialize for SecretKey

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&[u8]> for SecretKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFrom<&[u8]> for SecretKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( bytes: &[u8] ) -> Result<SecretKey, <SecretKey as TryFrom<&[u8]>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/key/struct.SharedSecret.html b/pr/2583/docs/iroh/base/key/struct.SharedSecret.html index 142f36207d..36fb01c159 100644 --- a/pr/2583/docs/iroh/base/key/struct.SharedSecret.html +++ b/pr/2583/docs/iroh/base/key/struct.SharedSecret.html @@ -1,7 +1,7 @@ -SharedSecret in iroh::base::key - Rust

Struct iroh::base::key::SharedSecret

source ·
pub struct SharedSecret(/* private fields */);
Expand description

Shared Secret.

-

Implementations§

source§

impl SharedSecret

source

pub fn seal(&self, buffer: &mut dyn Buffer)

Seals the provided cleartext.

-
source

pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

-

Trait Implementations§

source§

impl Debug for SharedSecret

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +SharedSecret in iroh::base::key - Rust

Struct iroh::base::key::SharedSecret

pub struct SharedSecret(/* private fields */);
Expand description

Shared Secret.

+

Implementations§

§

impl SharedSecret

pub fn seal(&self, buffer: &mut dyn Buffer)

Seals the provided cleartext.

+

pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

+

Trait Implementations§

§

impl Debug for SharedSecret

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/key/type.NodeId.html b/pr/2583/docs/iroh/base/key/type.NodeId.html index 9b62d77f88..8e75ee3309 100644 --- a/pr/2583/docs/iroh/base/key/type.NodeId.html +++ b/pr/2583/docs/iroh/base/key/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh::base::key - Rust

Type Alias iroh::base::key::NodeId

source ·
pub type NodeId = PublicKey;
Expand description

The identifier for a node in the (iroh) network.

+NodeId in iroh::base::key - Rust

Type Alias iroh::base::key::NodeId

pub type NodeId = PublicKey;
Expand description

The identifier for a node in the (iroh) network.

Each node in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify a node. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific node only.

diff --git a/pr/2583/docs/iroh/base/node_addr/enum.AddrInfoOptions.html b/pr/2583/docs/iroh/base/node_addr/enum.AddrInfoOptions.html index d76d2eeab8..4ba9a818eb 100644 --- a/pr/2583/docs/iroh/base/node_addr/enum.AddrInfoOptions.html +++ b/pr/2583/docs/iroh/base/node_addr/enum.AddrInfoOptions.html @@ -1,4 +1,4 @@ -AddrInfoOptions in iroh::base::node_addr - Rust

Enum iroh::base::node_addr::AddrInfoOptions

source ·
pub enum AddrInfoOptions {
+AddrInfoOptions in iroh::base::node_addr - Rust

Enum iroh::base::node_addr::AddrInfoOptions

pub enum AddrInfoOptions {
     Id,
     RelayAndAddresses,
     Relay,
@@ -9,18 +9,18 @@
 
§

RelayAndAddresses

Includes both the relay URL and the direct addresses.

§

Relay

Only includes the relay URL.

§

Addresses

Only includes the direct addresses.

-

Trait Implementations§

source§

impl Clone for AddrInfoOptions

source§

fn clone(&self) -> AddrInfoOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AddrInfoOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for AddrInfoOptions

source§

fn default() -> AddrInfoOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AddrInfoOptions

Trait Implementations§

§

impl Clone for AddrInfoOptions

§

fn clone(&self) -> AddrInfoOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for AddrInfoOptions

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for AddrInfoOptions

§

fn default() -> AddrInfoOptions

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for AddrInfoOptions

§

fn deserialize<__D>( __deserializer: __D ) -> Result<AddrInfoOptions, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for AddrInfoOptions

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl FromStr for AddrInfoOptions

§

type Err = FromStrError

The associated error which can be returned from parsing.
source§

fn from_str( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Display for AddrInfoOptions

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl FromStr for AddrInfoOptions

§

type Err = FromStrError

The associated error which can be returned from parsing.
§

fn from_str( src: &str -) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for AddrInfoOptions

source§

fn eq(&self, other: &AddrInfoOptions) -> bool

This method tests for self and other values to be equal, and is used +) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl PartialEq for AddrInfoOptions

§

fn eq(&self, other: &AddrInfoOptions) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AddrInfoOptions

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for AddrInfoOptions

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for AddrInfoOptions

source§

impl Eq for AddrInfoOptions

source§

impl StructuralPartialEq for AddrInfoOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for AddrInfoOptions

§

impl Eq for AddrInfoOptions

§

impl StructuralPartialEq for AddrInfoOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/node_addr/index.html b/pr/2583/docs/iroh/base/node_addr/index.html index 148590623c..bd951bf381 100644 --- a/pr/2583/docs/iroh/base/node_addr/index.html +++ b/pr/2583/docs/iroh/base/node_addr/index.html @@ -1,4 +1,4 @@ -iroh::base::node_addr - Rust

Module iroh::base::node_addr

source ·
Expand description

Addressing for iroh nodes.

+iroh::base::node_addr - Rust

Module iroh::base::node_addr

Expand description

Addressing for iroh nodes.

This module contains some common addressing types for iroh. A node is uniquely identified by the NodeId but that does not make it addressable on the network layer. For this the addition of a RelayUrl and/or direct addresses are required.

diff --git a/pr/2583/docs/iroh/base/node_addr/struct.AddrInfo.html b/pr/2583/docs/iroh/base/node_addr/struct.AddrInfo.html index 2b082dec7d..5aa47302be 100644 --- a/pr/2583/docs/iroh/base/node_addr/struct.AddrInfo.html +++ b/pr/2583/docs/iroh/base/node_addr/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh::base::node_addr - Rust

Struct iroh::base::node_addr::AddrInfo

source ·
pub struct AddrInfo {
+AddrInfo in iroh::base::node_addr - Rust

Struct iroh::base::node_addr::AddrInfo

pub struct AddrInfo {
     pub relay_url: Option<RelayUrl>,
     pub direct_addresses: BTreeSet<SocketAddr>,
 }
Expand description

Network paths to contact an iroh-net node.

@@ -7,26 +7,26 @@ other node, see NodeAddr for details.

Fields§

§relay_url: Option<RelayUrl>

The node’s home relay url.

§direct_addresses: BTreeSet<SocketAddr>

Socket addresses where the peer might be reached directly.

-

Implementations§

source§

impl AddrInfo

source

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

-
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

Implementations§

§

impl AddrInfo

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

+

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in ab AddrInfo received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-

Trait Implementations§

source§

impl Clone for AddrInfo

source§

fn clone(&self) -> AddrInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AddrInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for AddrInfo

source§

fn default() -> AddrInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AddrInfo

Trait Implementations§

§

impl Clone for AddrInfo

§

fn clone(&self) -> AddrInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for AddrInfo

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for AddrInfo

§

fn default() -> AddrInfo

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for AddrInfo

§

fn deserialize<__D>( __deserializer: __D ) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> AddrInfo

Converts to this type from the input type.
source§

impl Ord for AddrInfo

source§

fn cmp(&self, other: &AddrInfo) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> AddrInfo

Converts to this type from the input type.
§

impl Ord for AddrInfo

§

fn cmp(&self, other: &AddrInfo) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for AddrInfo

source§

fn eq(&self, other: &AddrInfo) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for AddrInfo

§

fn eq(&self, other: &AddrInfo) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AddrInfo

source§

fn partial_cmp(&self, other: &AddrInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for AddrInfo

§

fn partial_cmp(&self, other: &AddrInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for AddrInfo

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for AddrInfo

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AddrInfo

source§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for AddrInfo

§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/node_addr/struct.NodeAddr.html b/pr/2583/docs/iroh/base/node_addr/struct.NodeAddr.html index 64b4ca92c6..710be5c1f4 100644 --- a/pr/2583/docs/iroh/base/node_addr/struct.NodeAddr.html +++ b/pr/2583/docs/iroh/base/node_addr/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh::base::node_addr - Rust

Struct iroh::base::node_addr::NodeAddr

source ·
pub struct NodeAddr {
+NodeAddr in iroh::base::node_addr - Rust

Struct iroh::base::node_addr::NodeAddr

pub struct NodeAddr {
     pub node_id: PublicKey,
     pub info: AddrInfo,
 }
Expand description

Network-level addressing information for an iroh-net node.

@@ -25,38 +25,38 @@ whenever a connection to other nodes needs to be established.

Fields§

§node_id: PublicKey

The node’s identifier.

§info: AddrInfo

Addressing information to connect to Self::node_id.

-

Implementations§

source§

impl NodeAddr

source

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

-
source

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url to the node’s AddrInfo.

-
source

pub fn with_direct_addresses( +

Implementations§

§

impl NodeAddr

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

+

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url to the node’s AddrInfo.

+

pub fn with_direct_addresses( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

Adds the given direct addresses to the peer’s AddrInfo.

-
source

pub fn from_parts( +

pub fn from_parts( node_id: PublicKey, relay_url: Option<RelayUrl>, direct_addresses: Vec<SocketAddr> ) -> NodeAddr

Creates a new NodeAddr from its parts.

-
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in a NodeAddr received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-
source

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

-
source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

-

Trait Implementations§

source§

impl Clone for NodeAddr

source§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NodeAddr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NodeAddr

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

+

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

+

Trait Implementations§

§

impl Clone for NodeAddr

§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for NodeAddr

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NodeAddr

§

fn deserialize<__D>( __deserializer: __D ) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

source§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(info: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl Ord for NodeAddr

source§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(info: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
§

impl Ord for NodeAddr

§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for NodeAddr

source§

fn eq(&self, other: &NodeAddr) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
§

impl PartialEq for NodeAddr

§

fn eq(&self, other: &NodeAddr) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for NodeAddr

source§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for NodeAddr

§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for NodeAddr

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for NodeAddr

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NodeAddr

source§

impl StructuralPartialEq for NodeAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for NodeAddr

§

impl StructuralPartialEq for NodeAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/node_addr/struct.RelayUrl.html b/pr/2583/docs/iroh/base/node_addr/struct.RelayUrl.html index ad92fac12a..e2c310ed16 100644 --- a/pr/2583/docs/iroh/base/node_addr/struct.RelayUrl.html +++ b/pr/2583/docs/iroh/base/node_addr/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh::base::node_addr - Rust

Struct iroh::base::node_addr::RelayUrl

source ·
pub struct RelayUrl(/* private fields */);
Expand description

A URL identifying a relay server.

+RelayUrl in iroh::base::node_addr - Rust

Struct iroh::base::node_addr::RelayUrl

pub struct RelayUrl(/* private fields */);
Expand description

A URL identifying a relay server.

This is but a wrapper around Url, with a few custom tweaks:

  • @@ -441,30 +441,30 @@
    §ExamplesPath::new_opt() returns None. (That is, if the percent-decoded path contains a NUL byte or, for a Windows path, is not UTF-8.)

    -

Trait Implementations§

source§

impl Clone for RelayUrl

source§

fn clone(&self) -> RelayUrl

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RelayUrl

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Deref for RelayUrl

Dereferences to the wrapped Url.

+

Trait Implementations§

§

impl Clone for RelayUrl

§

fn clone(&self) -> RelayUrl

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RelayUrl

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for RelayUrl

Dereferences to the wrapped Url.

Note that DerefMut is not implemented on purpose, so this type has more flexibility to change the inner later.

-
§

type Target = Url

The resulting type after dereferencing.
source§

fn deref(&self) -> &<RelayUrl as Deref>::Target

Dereferences the value.
source§

impl<'de> Deserialize<'de> for RelayUrl

§

type Target = Url

The resulting type after dereferencing.
§

fn deref(&self) -> &<RelayUrl as Deref>::Target

Dereferences the value.
§

impl<'de> Deserialize<'de> for RelayUrl

§

fn deserialize<__D>( __deserializer: __D ) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for RelayUrl

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<RelayUrl> for Url

source§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
source§

impl From<RelayUrlInfo> for RelayUrl

source§

fn from(value: RelayUrlInfo) -> RelayUrl

Converts to this type from the input type.
source§

impl From<Url> for RelayUrl

source§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
source§

impl FromStr for RelayUrl

Support for parsing strings directly.

+ __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for RelayUrl

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<RelayUrl> for Url

§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
source§

impl From<RelayUrlInfo> for RelayUrl

source§

fn from(value: RelayUrlInfo) -> RelayUrl

Converts to this type from the input type.
§

impl From<Url> for RelayUrl

§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
§

impl FromStr for RelayUrl

Support for parsing strings directly.

If you need more control over the error first create a Url and use RelayUrl::from instead.

-
§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for RelayUrl

source§

fn hash<__H>(&self, state: &mut __H)
where +
§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

Parses a string s to return a value of this type. Read more

§

impl Hash for RelayUrl

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for RelayUrl

source§

fn cmp(&self, other: &RelayUrl) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for RelayUrl

§

fn cmp(&self, other: &RelayUrl) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for RelayUrl

source§

fn eq(&self, other: &RelayUrl) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
§

impl PartialEq for RelayUrl

§

fn eq(&self, other: &RelayUrl) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for RelayUrl

source§

fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for RelayUrl

§

fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for RelayUrl

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for RelayUrl

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RelayUrl

source§

impl StructuralPartialEq for RelayUrl

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for RelayUrl

§

impl StructuralPartialEq for RelayUrl

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/rpc/index.html b/pr/2583/docs/iroh/base/rpc/index.html index 6958e159a0..7cbba3416a 100644 --- a/pr/2583/docs/iroh/base/rpc/index.html +++ b/pr/2583/docs/iroh/base/rpc/index.html @@ -1 +1 @@ -iroh::base::rpc - Rust

Module iroh::base::rpc

source ·

Structs§

  • A serializable error type for use in RPC responses.

Type Aliases§

  • A serializable result type for use in RPC responses.
\ No newline at end of file +iroh::base::rpc - Rust

Module iroh::base::rpc

Structs§

  • A serializable error type for use in RPC responses.

Type Aliases§

  • A serializable result type for use in RPC responses.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/base/rpc/struct.RpcError.html b/pr/2583/docs/iroh/base/rpc/struct.RpcError.html index 1008d48374..4f33d56528 100644 --- a/pr/2583/docs/iroh/base/rpc/struct.RpcError.html +++ b/pr/2583/docs/iroh/base/rpc/struct.RpcError.html @@ -1,8 +1,8 @@ -RpcError in iroh::base::rpc - Rust

Struct iroh::base::rpc::RpcError

source ·
pub struct RpcError(/* private fields */);
Expand description

A serializable error type for use in RPC responses.

-

Trait Implementations§

source§

impl Clone for RpcError

source§

fn clone(&self) -> RpcError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RpcError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RpcError

source§

fn deserialize<__D>( +RpcError in iroh::base::rpc - Rust

Struct iroh::base::rpc::RpcError

pub struct RpcError(/* private fields */);
Expand description

A serializable error type for use in RPC responses.

+

Trait Implementations§

§

impl Clone for RpcError

§

fn clone(&self) -> RpcError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RpcError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for RpcError

§

fn deserialize<__D>( __deserializer: __D ) -> Result<RpcError, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for RpcError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for RpcError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for RpcError

source§

fn from(e: Error) -> RpcError

Converts to this type from the input type.
source§

impl From<Error> for RpcError

source§

fn from(e: Error) -> RpcError

Converts to this type from the input type.
source§

impl Serialize for RpcError

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for RpcError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for RpcError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<Error> for RpcError

§

fn from(e: Error) -> RpcError

Converts to this type from the input type.
§

impl From<Error> for RpcError

§

fn from(e: Error) -> RpcError

Converts to this type from the input type.
§

impl Serialize for RpcError

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/base/rpc/type.RpcResult.html b/pr/2583/docs/iroh/base/rpc/type.RpcResult.html index b48cc36cef..4b1e9f112c 100644 --- a/pr/2583/docs/iroh/base/rpc/type.RpcResult.html +++ b/pr/2583/docs/iroh/base/rpc/type.RpcResult.html @@ -1,4 +1,4 @@ -RpcResult in iroh::base::rpc - Rust

Type Alias iroh::base::rpc::RpcResult

source ·
pub type RpcResult<T> = Result<T, RpcError>;
Expand description

A serializable result type for use in RPC responses.

+RpcResult in iroh::base::rpc - Rust

Type Alias iroh::base::rpc::RpcResult

pub type RpcResult<T> = Result<T, RpcError>;
Expand description

A serializable result type for use in RPC responses.

Aliased Type§

enum RpcResult<T> {
     Ok(T),
     Err(RpcError),
diff --git a/pr/2583/docs/iroh/base/ticket/enum.Error.html b/pr/2583/docs/iroh/base/ticket/enum.Error.html
index a0d8798e9c..c2e26eb82d 100644
--- a/pr/2583/docs/iroh/base/ticket/enum.Error.html
+++ b/pr/2583/docs/iroh/base/ticket/enum.Error.html
@@ -1,4 +1,4 @@
-Error in iroh::base::ticket - Rust

Enum iroh::base::ticket::Error

source ·
pub enum Error {
+Error in iroh::base::ticket - Rust

Enum iroh::base::ticket::Error

pub enum Error {
     Kind {
         expected: &'static str,
     },
@@ -10,7 +10,7 @@
 

Fields

§expected: &'static str
§

Postcard(Error)

This looks like a ticket, but postcard deserialization failed.

§

Encoding(DecodeError)

This looks like a ticket, but base32 decoding failed.

§

Verify(&'static str)

Verification of the deserialized bytes failed.

-

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<DecodeError> for Error

source§

fn from(source: DecodeError) -> Error

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for Error

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for Error

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for Error

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<DecodeError> for Error

§

fn from(source: DecodeError) -> Error

Converts to this type from the input type.
§

impl From<Error> for Error

§

fn from(source: Error) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/ticket/index.html b/pr/2583/docs/iroh/base/ticket/index.html index 18e6505f5a..714c239d2e 100644 --- a/pr/2583/docs/iroh/base/ticket/index.html +++ b/pr/2583/docs/iroh/base/ticket/index.html @@ -1,3 +1,3 @@ -iroh::base::ticket - Rust

Module iroh::base::ticket

source ·

Structs§

  • A token containing everything to get a file from the provider.
  • A token containing everything to get a file from the provider.

Enums§

  • An error deserializing an iroh ticket.

Traits§

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for BlobTicket

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl FromStr for BlobTicket

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<BlobTicket, <BlobTicket as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl PartialEq for BlobTicket

§

fn eq(&self, other: &BlobTicket) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlobTicket

source§

fn serialize<S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for BlobTicket

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Ticket for BlobTicket

source§

const KIND: &'static str = "blob"

String prefix describing the kind of iroh ticket. Read more
source§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
source§

fn from_bytes(bytes: &[u8]) -> Result<BlobTicket, Error>

Deserialize from the base32 string representation bytes.
source§

fn serialize(&self) -> String

Serialize to string.
source§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
source§

impl Eq for BlobTicket

source§

impl StructuralPartialEq for BlobTicket

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Ticket for BlobTicket

§

const KIND: &'static str = "blob"

String prefix describing the kind of iroh ticket. Read more
§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
§

fn from_bytes(bytes: &[u8]) -> Result<BlobTicket, Error>

Deserialize from the base32 string representation bytes.
§

fn serialize(&self) -> String

Serialize to string.
§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
§

impl Eq for BlobTicket

§

impl StructuralPartialEq for BlobTicket

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/ticket/struct.NodeTicket.html b/pr/2583/docs/iroh/base/ticket/struct.NodeTicket.html index 3c261857d7..c62adeebca 100644 --- a/pr/2583/docs/iroh/base/ticket/struct.NodeTicket.html +++ b/pr/2583/docs/iroh/base/ticket/struct.NodeTicket.html @@ -1,17 +1,17 @@ -NodeTicket in iroh::base::ticket - Rust

Struct iroh::base::ticket::NodeTicket

source ·
pub struct NodeTicket { /* private fields */ }
Expand description

A token containing everything to get a file from the provider.

+NodeTicket in iroh::base::ticket - Rust

Struct iroh::base::ticket::NodeTicket

pub struct NodeTicket { /* private fields */ }
Expand description

A token containing everything to get a file from the provider.

It is a single item which can be easily serialized and deserialized.

-

Implementations§

source§

impl NodeTicket

source

pub fn new(node: NodeAddr) -> Result<NodeTicket, Error>

Creates a new ticket.

-
source

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

-

Trait Implementations§

source§

impl Clone for NodeTicket

source§

fn clone(&self) -> NodeTicket

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NodeTicket

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NodeTicket

Implementations§

§

impl NodeTicket

pub fn new(node: NodeAddr) -> Result<NodeTicket, Error>

Creates a new ticket.

+

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

+

Trait Implementations§

§

impl Clone for NodeTicket

§

fn clone(&self) -> NodeTicket

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for NodeTicket

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NodeTicket

§

fn deserialize<D>( deserializer: D ) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for NodeTicket

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl FromStr for NodeTicket

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<NodeTicket, <NodeTicket as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for NodeTicket

source§

fn eq(&self, other: &NodeTicket) -> bool

This method tests for self and other values to be equal, and is used + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Display for NodeTicket

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl FromStr for NodeTicket

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<NodeTicket, <NodeTicket as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl PartialEq for NodeTicket

§

fn eq(&self, other: &NodeTicket) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NodeTicket

source§

fn serialize<S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for NodeTicket

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Ticket for NodeTicket

source§

const KIND: &'static str = "node"

String prefix describing the kind of iroh ticket. Read more
source§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
source§

fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

Deserialize from the base32 string representation bytes.
source§

fn serialize(&self) -> String

Serialize to string.
source§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
source§

impl Eq for NodeTicket

source§

impl StructuralPartialEq for NodeTicket

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Ticket for NodeTicket

§

const KIND: &'static str = "node"

String prefix describing the kind of iroh ticket. Read more
§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
§

fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

Deserialize from the base32 string representation bytes.
§

fn serialize(&self) -> String

Serialize to string.
§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
§

impl Eq for NodeTicket

§

impl StructuralPartialEq for NodeTicket

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/base/ticket/trait.Ticket.html b/pr/2583/docs/iroh/base/ticket/trait.Ticket.html index 159d707ecb..a94e3e3a5d 100644 --- a/pr/2583/docs/iroh/base/ticket/trait.Ticket.html +++ b/pr/2583/docs/iroh/base/ticket/trait.Ticket.html @@ -1,4 +1,4 @@ -Ticket in iroh::base::ticket - Rust

Trait iroh::base::ticket::Ticket

source ·
pub trait Ticket: Sized {
+Ticket in iroh::base::ticket - Rust

Trait iroh::base::ticket::Ticket

pub trait Ticket: Sized {
     const KIND: &'static str;
 
     // Required methods
@@ -17,10 +17,10 @@
 versioning, others might not.

The serialization format for converting the ticket from and to bytes is left to the implementer. We recommend using postcard for serialization.

-

Required Associated Constants§

source

const KIND: &'static str

String prefix describing the kind of iroh ticket.

+

Required Associated Constants§

const KIND: &'static str

String prefix describing the kind of iroh ticket.

This should be lower case ascii characters.

-

Required Methods§

source

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.

-
source

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Deserialize from the base32 string representation bytes.

-

Provided Methods§

source

fn serialize(&self) -> String

Serialize to string.

-
source

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Ticket for DocTicket

source§

const KIND: &'static str = "doc"

source§

impl Ticket for NodeTicket

source§

const KIND: &'static str = "node"

source§

impl Ticket for BlobTicket

source§

const KIND: &'static str = "blob"

\ No newline at end of file +

Required Methods§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.

+

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Deserialize from the base32 string representation bytes.

+

Provided Methods§

fn serialize(&self) -> String

Serialize to string.

+

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Ticket for DocTicket

source§

const KIND: &'static str = "doc"

§

impl Ticket for NodeTicket

§

const KIND: &'static str = "node"

§

impl Ticket for BlobTicket

§

const KIND: &'static str = "blob"

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/constant.IROH_BLOCK_SIZE.html b/pr/2583/docs/iroh/blobs/constant.IROH_BLOCK_SIZE.html index b7f819f1a5..b6590ef567 100644 --- a/pr/2583/docs/iroh/blobs/constant.IROH_BLOCK_SIZE.html +++ b/pr/2583/docs/iroh/blobs/constant.IROH_BLOCK_SIZE.html @@ -1,2 +1,2 @@ -IROH_BLOCK_SIZE in iroh::blobs - Rust

Constant iroh::blobs::IROH_BLOCK_SIZE

source ·
pub const IROH_BLOCK_SIZE: BlockSize;
Expand description

Block size used by iroh, 2^4*1024 = 16KiB

+IROH_BLOCK_SIZE in iroh::blobs - Rust

Constant iroh::blobs::IROH_BLOCK_SIZE

pub const IROH_BLOCK_SIZE: BlockSize;
Expand description

Block size used by iroh, 2^4*1024 = 16KiB

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/downloader/enum.DownloadError.html b/pr/2583/docs/iroh/blobs/downloader/enum.DownloadError.html index 5de1a166e2..adcd46da6c 100644 --- a/pr/2583/docs/iroh/blobs/downloader/enum.DownloadError.html +++ b/pr/2583/docs/iroh/blobs/downloader/enum.DownloadError.html @@ -1,4 +1,4 @@ -DownloadError in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::DownloadError

source ·
pub enum DownloadError {
+DownloadError in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::DownloadError

pub enum DownloadError {
     DownloadFailed,
     Cancelled,
     NoProviders,
@@ -8,7 +8,7 @@
 
§

Cancelled

The download was cancelled by us

§

NoProviders

No provider nodes found

§

ActorClosed

Failed to receive response from service.

-

Trait Implementations§

source§

impl Clone for DownloadError

source§

fn clone(&self) -> DownloadError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DownloadError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for DownloadError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for DownloadError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for DownloadError

§

fn clone(&self) -> DownloadError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for DownloadError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for DownloadError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for DownloadError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/downloader/enum.FailureAction.html b/pr/2583/docs/iroh/blobs/downloader/enum.FailureAction.html index 80d6dd9974..2df383757f 100644 --- a/pr/2583/docs/iroh/blobs/downloader/enum.FailureAction.html +++ b/pr/2583/docs/iroh/blobs/downloader/enum.FailureAction.html @@ -1,4 +1,4 @@ -FailureAction in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::FailureAction

source ·
pub enum FailureAction {
+FailureAction in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::FailureAction

pub enum FailureAction {
     AllIntentsDropped,
     AbortRequest(Error),
     DropPeer(Error),
@@ -8,7 +8,7 @@
 
§

AbortRequest(Error)

An error occurred that prevents the request from being retried at all.

§

DropPeer(Error)

An error occurred that suggests the node should not be used in general.

§

RetryLater(Error)

An error occurred in which neither the node nor the request are at fault.

-

Trait Implementations§

source§

impl Debug for FailureAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<GetError> for FailureAction

source§

fn from(e: GetError) -> FailureAction

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for FailureAction

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<GetError> for FailureAction

§

fn from(e: GetError) -> FailureAction

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/downloader/index.html b/pr/2583/docs/iroh/blobs/downloader/index.html index 201bd3c29a..ca061a1e26 100644 --- a/pr/2583/docs/iroh/blobs/downloader/index.html +++ b/pr/2583/docs/iroh/blobs/downloader/index.html @@ -1,4 +1,4 @@ -iroh::blobs::downloader - Rust

Module iroh::blobs::downloader

source ·
Expand description

Handle downloading blobs and collections concurrently and from nodes.

+iroh::blobs::downloader - Rust

Module iroh::blobs::downloader

Expand description

Handle downloading blobs and collections concurrently and from nodes.

The Downloader interacts with four main components to this end.

§

fn from_iter<T>(iter: T) -> Collection
where + T: IntoIterator<Item = (K, V)>,

Creates a value from an iterator. Read more
§

impl Index<usize> for Collection

§

type Output = (String, Hash)

The returned type after indexing.
§

fn index(&self, index: usize) -> &<Collection as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
§

impl IntoIterator for Collection

§

type Item = (String, Hash)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<<Collection as IntoIterator>::Item>

Which kind of iterator are we turning this into?
§

fn into_iter(self) -> <Collection as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
§

impl PartialEq for Collection

§

fn eq(&self, other: &Collection) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Collection

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for Collection

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Collection

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for Collection

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/format/collection/trait.SimpleStore.html b/pr/2583/docs/iroh/blobs/format/collection/trait.SimpleStore.html index b47058796a..e8bd0245ca 100644 --- a/pr/2583/docs/iroh/blobs/format/collection/trait.SimpleStore.html +++ b/pr/2583/docs/iroh/blobs/format/collection/trait.SimpleStore.html @@ -1,9 +1,9 @@ -SimpleStore in iroh::blobs::format::collection - Rust

Trait iroh::blobs::format::collection::SimpleStore

source ·
pub trait SimpleStore {
+SimpleStore in iroh::blobs::format::collection - Rust

Trait iroh::blobs::format::collection::SimpleStore

pub trait SimpleStore {
     // Required method
     fn load(
         &self,
         hash: Hash
     ) -> impl Future<Output = Result<Bytes, Error>> + Send;
 }
Expand description

A simple store trait for loading blobs

-

Required Methods§

source

fn load(&self, hash: Hash) -> impl Future<Output = Result<Bytes, Error>> + Send

Load a blob from the store

+

Required Methods§

fn load(&self, hash: Hash) -> impl Future<Output = Result<Bytes, Error>> + Send

Load a blob from the store

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/format/index.html b/pr/2583/docs/iroh/blobs/format/index.html index 79827f867a..90181f6efb 100644 --- a/pr/2583/docs/iroh/blobs/format/index.html +++ b/pr/2583/docs/iroh/blobs/format/index.html @@ -1,4 +1,4 @@ -iroh::blobs::format - Rust

Module iroh::blobs::format

source ·
Expand description

Defines data formats for HashSeq.

+iroh::blobs::format - Rust

Module iroh::blobs::format

Expand description

Defines data formats for HashSeq.

The exact details how to use a HashSeq for specific purposes is up to the user. However, the following approach is used by iroh formats:

The first child blob is a metadata blob. It starts with a header, followed diff --git a/pr/2583/docs/iroh/blobs/get/db/enum.BlobId.html b/pr/2583/docs/iroh/blobs/get/db/enum.BlobId.html index 9676f2a857..1cabbac26f 100644 --- a/pr/2583/docs/iroh/blobs/get/db/enum.BlobId.html +++ b/pr/2583/docs/iroh/blobs/get/db/enum.BlobId.html @@ -1,27 +1,27 @@ -BlobId in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::BlobId

source ·
pub enum BlobId {
+BlobId in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::BlobId

pub enum BlobId {
     Root,
     Child(NonZero<u64>),
 }
Expand description

The id of a blob in a transfer

Variants§

§

Root

The root blob (child id 0)

§

Child(NonZero<u64>)

A child blob (child id > 0)

-

Trait Implementations§

source§

impl Clone for BlobId

source§

fn clone(&self) -> BlobId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlobId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BlobId

Trait Implementations§

§

impl Clone for BlobId

§

fn clone(&self) -> BlobId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for BlobId

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for BlobId

§

fn deserialize<__D>( __deserializer: __D ) -> Result<BlobId, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for BlobId

source§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Hash for BlobId

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for BlobId

source§

fn cmp(&self, other: &BlobId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for BlobId

§

fn cmp(&self, other: &BlobId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for BlobId

source§

fn eq(&self, other: &BlobId) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for BlobId

§

fn eq(&self, other: &BlobId) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for BlobId

source§

fn partial_cmp(&self, other: &BlobId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for BlobId

§

fn partial_cmp(&self, other: &BlobId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for BlobId

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for BlobId

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlobId

source§

impl Eq for BlobId

source§

impl StructuralPartialEq for BlobId

Auto Trait Implementations§

§

impl Freeze for BlobId

§

impl RefUnwindSafe for BlobId

§

impl Send for BlobId

§

impl Sync for BlobId

§

impl Unpin for BlobId

§

impl UnwindSafe for BlobId

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for BlobId

§

impl Eq for BlobId

§

impl StructuralPartialEq for BlobId

Auto Trait Implementations§

§

impl Freeze for BlobId

§

impl RefUnwindSafe for BlobId

§

impl Send for BlobId

§

impl Sync for BlobId

§

impl Unpin for BlobId

§

impl UnwindSafe for BlobId

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where @@ -145,7 +145,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/db/enum.BlobInfo.html b/pr/2583/docs/iroh/blobs/get/db/enum.BlobInfo.html index 29bc222241..9fee6b9c35 100644 --- a/pr/2583/docs/iroh/blobs/get/db/enum.BlobInfo.html +++ b/pr/2583/docs/iroh/blobs/get/db/enum.BlobInfo.html @@ -1,4 +1,4 @@ -BlobInfo in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::BlobInfo

source ·
pub enum BlobInfo<D>
where +BlobInfo in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::BlobInfo

pub enum BlobInfo<D>
where D: Store,
{ Complete { size: u64, @@ -15,19 +15,19 @@

Fields

§entry: <D as MapMut>::EntryMut

The partial entry.

§valid_ranges: RangeSet<[ChunkNum; 2]>

The ranges that are available locally.

§

Missing

we don’t have the blob at all

-

Implementations§

source§

impl<D> BlobInfo<D>
where - D: Store,

source

pub fn size(&self) -> Option<BaoBlobSize>

The size of the blob, if known.

-
source

pub fn valid_ranges(&self) -> RangeSet<[ChunkNum; 2]>

Ranges that are valid locally.

+

Implementations§

§

impl<D> BlobInfo<D>
where + D: Store,

pub fn size(&self) -> Option<BaoBlobSize>

The size of the blob, if known.

+

pub fn valid_ranges(&self) -> RangeSet<[ChunkNum; 2]>

Ranges that are valid locally.

This will be all for complete blobs, empty for missing blobs, and a set with possibly open last range for partial blobs.

-
source

pub fn missing_ranges(&self) -> RangeSet<[ChunkNum; 2]>

Ranges that are missing locally and need to be requested.

+

pub fn missing_ranges(&self) -> RangeSet<[ChunkNum; 2]>

Ranges that are missing locally and need to be requested.

This will be empty for complete blobs, all for missing blobs, and a set with possibly open last range for partial blobs.

-

Trait Implementations§

source§

impl<D> Clone for BlobInfo<D>
where +

Trait Implementations§

§

impl<D> Clone for BlobInfo<D>
where D: Clone + Store, - <D as MapMut>::EntryMut: Clone,

source§

fn clone(&self) -> BlobInfo<D>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<D> Debug for BlobInfo<D>
where + <D as MapMut>::EntryMut: Clone,

§

fn clone(&self) -> BlobInfo<D>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<D> Debug for BlobInfo<D>
where D: Debug + Store, - <D as MapMut>::EntryMut: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<D> Freeze for BlobInfo<D>
where + <D as MapMut>::EntryMut: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<D> Freeze for BlobInfo<D>
where <D as MapMut>::EntryMut: Freeze,

§

impl<D> RefUnwindSafe for BlobInfo<D>
where <D as MapMut>::EntryMut: RefUnwindSafe,

§

impl<D> Send for BlobInfo<D>

§

impl<D> Sync for BlobInfo<D>

§

impl<D> Unpin for BlobInfo<D>
where <D as MapMut>::EntryMut: Unpin,

§

impl<D> UnwindSafe for BlobInfo<D>
where diff --git a/pr/2583/docs/iroh/blobs/get/db/enum.DownloadProgress.html b/pr/2583/docs/iroh/blobs/get/db/enum.DownloadProgress.html index 4fb1dfb3b2..5c608dc9b6 100644 --- a/pr/2583/docs/iroh/blobs/get/db/enum.DownloadProgress.html +++ b/pr/2583/docs/iroh/blobs/get/db/enum.DownloadProgress.html @@ -1,4 +1,4 @@ -DownloadProgress in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::DownloadProgress

source ·
pub enum DownloadProgress {
+DownloadProgress in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::DownloadProgress

pub enum DownloadProgress {
     InitialState(TransferState),
     FoundLocal {
         child: BlobId,
@@ -53,10 +53,10 @@
 

This will be the last message in the stream.

§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

-

Trait Implementations§

source§

impl Clone for DownloadProgress

source§

fn clone(&self) -> DownloadProgress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DownloadProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for DownloadProgress

Trait Implementations§

§

impl Clone for DownloadProgress

§

fn clone(&self) -> DownloadProgress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for DownloadProgress

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for DownloadProgress

§

fn deserialize<__D>( __deserializer: __D ) -> Result<DownloadProgress, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for DownloadProgress

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for DownloadProgress

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/blobs/get/db/fn.blob_info.html b/pr/2583/docs/iroh/blobs/get/db/fn.blob_info.html index 83719aede8..33df248b76 100644 --- a/pr/2583/docs/iroh/blobs/get/db/fn.blob_info.html +++ b/pr/2583/docs/iroh/blobs/get/db/fn.blob_info.html @@ -1,4 +1,4 @@ -blob_info in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::blob_info

source ·
pub async fn blob_info<D>(db: &D, hash: &Hash) -> Result<BlobInfo<D>, Error>
where +blob_info in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::blob_info

pub async fn blob_info<D>(db: &D, hash: &Hash) -> Result<BlobInfo<D>, Error>
where D: Store,
Expand description

Get information about a blob in a store.

This will compute the valid ranges for partial blobs, so it is somewhat expensive for those.

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/db/fn.get_to_db.html b/pr/2583/docs/iroh/blobs/get/db/fn.get_to_db.html index f70f1cf732..fa946b75d9 100644 --- a/pr/2583/docs/iroh/blobs/get/db/fn.get_to_db.html +++ b/pr/2583/docs/iroh/blobs/get/db/fn.get_to_db.html @@ -1,4 +1,4 @@ -get_to_db in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::get_to_db

source ·
pub async fn get_to_db<D, C, F>(
+get_to_db in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::get_to_db

pub async fn get_to_db<D, C, F>(
     db: &D,
     get_conn: C,
     hash_and_format: &HashAndFormat,
diff --git a/pr/2583/docs/iroh/blobs/get/db/fn.valid_ranges.html b/pr/2583/docs/iroh/blobs/get/db/fn.valid_ranges.html
index 935f12ae44..3035a1767b 100644
--- a/pr/2583/docs/iroh/blobs/get/db/fn.valid_ranges.html
+++ b/pr/2583/docs/iroh/blobs/get/db/fn.valid_ranges.html
@@ -1,4 +1,4 @@
-valid_ranges in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::valid_ranges

source ·
pub async fn valid_ranges<D>(
+valid_ranges in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::valid_ranges

pub async fn valid_ranges<D>(
     entry: &<D as MapMut>::EntryMut
 ) -> Result<RangeSet<[ChunkNum; 2]>, Error>
where D: MapMut,
Expand description

Given a partial entry, get the valid ranges.

diff --git a/pr/2583/docs/iroh/blobs/get/db/index.html b/pr/2583/docs/iroh/blobs/get/db/index.html index 44dce23ba5..a7b6be44bf 100644 --- a/pr/2583/docs/iroh/blobs/get/db/index.html +++ b/pr/2583/docs/iroh/blobs/get/db/index.html @@ -1,2 +1,2 @@ -iroh::blobs::get::db - Rust

Module iroh::blobs::get::db

source ·
Expand description

Functions that use the iroh-blobs protocol in conjunction with a bao store.

+iroh::blobs::get::db - Rust

Module iroh::blobs::get::db

Expand description

Functions that use the iroh-blobs protocol in conjunction with a bao store.

Enums§

  • The id of a blob in a transfer
  • Information about a the status of a blob in a store.
  • Progress updates for the get operation.

Functions§

  • Get information about a blob in a store.
  • Get a blob or collection into a store.
  • Given a partial entry, get the valid ranges.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/enum.GetResponseError.html b/pr/2583/docs/iroh/blobs/get/enum.GetResponseError.html index 438ede7393..00b4f58955 100644 --- a/pr/2583/docs/iroh/blobs/get/enum.GetResponseError.html +++ b/pr/2583/docs/iroh/blobs/get/enum.GetResponseError.html @@ -1,4 +1,4 @@ -GetResponseError in iroh::blobs::get - Rust

Enum iroh::blobs::get::GetResponseError

source ·
pub enum GetResponseError {
+GetResponseError in iroh::blobs::get - Rust

Enum iroh::blobs::get::GetResponseError

pub enum GetResponseError {
     Connection(ConnectionError),
     Write(WriteError),
     Read(ReadError),
@@ -10,7 +10,7 @@
 
§

Read(ReadError)

Error when reading from the stream

§

Decode(DecodeError)

Error when decoding, e.g. hash mismatch

§

Generic(Error)

A generic error

-

Trait Implementations§

source§

impl Debug for GetResponseError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for GetResponseError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for GetResponseError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<ConnectionError> for GetResponseError

source§

fn from(source: ConnectionError) -> GetResponseError

Converts to this type from the input type.
source§

impl From<DecodeError> for GetResponseError

source§

fn from(cause: DecodeError) -> GetResponseError

Converts to this type from the input type.
source§

impl From<Error> for GetResponseError

source§

fn from(cause: Error) -> GetResponseError

Converts to this type from the input type.
source§

impl From<Error> for GetResponseError

source§

fn from(cause: Error) -> GetResponseError

Converts to this type from the input type.
source§

impl From<ReadError> for GetResponseError

source§

fn from(source: ReadError) -> GetResponseError

Converts to this type from the input type.
source§

impl From<WriteError> for GetResponseError

source§

fn from(source: WriteError) -> GetResponseError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for GetResponseError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for GetResponseError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for GetResponseError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ConnectionError> for GetResponseError

§

fn from(source: ConnectionError) -> GetResponseError

Converts to this type from the input type.
§

impl From<DecodeError> for GetResponseError

§

fn from(cause: DecodeError) -> GetResponseError

Converts to this type from the input type.
§

impl From<Error> for GetResponseError

§

fn from(cause: Error) -> GetResponseError

Converts to this type from the input type.
§

impl From<Error> for GetResponseError

§

fn from(cause: Error) -> GetResponseError

Converts to this type from the input type.
§

impl From<ReadError> for GetResponseError

§

fn from(source: ReadError) -> GetResponseError

Converts to this type from the input type.
§

impl From<WriteError> for GetResponseError

§

fn from(source: WriteError) -> GetResponseError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/error/enum.GetError.html b/pr/2583/docs/iroh/blobs/get/error/enum.GetError.html index 84d1696645..17659c2db2 100644 --- a/pr/2583/docs/iroh/blobs/get/error/enum.GetError.html +++ b/pr/2583/docs/iroh/blobs/get/error/enum.GetError.html @@ -1,4 +1,4 @@ -GetError in iroh::blobs::get::error - Rust

Enum iroh::blobs::get::error::GetError

source ·
pub enum GetError {
+GetError in iroh::blobs::get::error - Rust

Enum iroh::blobs::get::error::GetError

pub enum GetError {
     NotFound(Error),
     RemoteReset(Error),
     NoncompliantNode(Error),
@@ -12,7 +12,7 @@
 
§

Io(Error)

Network or IO operation failed.

§

BadRequest(Error)

Our download request is invalid.

§

LocalFailure(Error)

Operation failed on the local node.

-

Trait Implementations§

source§

impl Debug for GetError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for GetError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for GetError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AtBlobHeaderNextError> for GetError

source§

fn from(value: AtBlobHeaderNextError) -> GetError

Converts to this type from the input type.
source§

impl From<ConnectedNextError> for GetError

source§

fn from(value: ConnectedNextError) -> GetError

Converts to this type from the input type.
source§

impl From<ConnectionError> for GetError

source§

fn from(value: ConnectionError) -> GetError

Converts to this type from the input type.
source§

impl From<DecodeError> for GetError

source§

fn from(value: DecodeError) -> GetError

Converts to this type from the input type.
source§

impl From<Error> for GetError

source§

fn from(value: Error) -> GetError

Converts to this type from the input type.
source§

impl From<GetError> for FailureAction

source§

fn from(e: GetError) -> FailureAction

Converts to this type from the input type.
source§

impl From<ProgressSendError> for GetError

source§

fn from(value: ProgressSendError) -> GetError

Converts to this type from the input type.
source§

impl From<ReadError> for GetError

source§

fn from(value: ReadError) -> GetError

Converts to this type from the input type.
source§

impl From<WriteError> for GetError

source§

fn from(value: WriteError) -> GetError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for GetError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for GetError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for GetError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<AtBlobHeaderNextError> for GetError

§

fn from(value: AtBlobHeaderNextError) -> GetError

Converts to this type from the input type.
§

impl From<ConnectedNextError> for GetError

§

fn from(value: ConnectedNextError) -> GetError

Converts to this type from the input type.
§

impl From<ConnectionError> for GetError

§

fn from(value: ConnectionError) -> GetError

Converts to this type from the input type.
§

impl From<DecodeError> for GetError

§

fn from(value: DecodeError) -> GetError

Converts to this type from the input type.
§

impl From<Error> for GetError

§

fn from(value: Error) -> GetError

Converts to this type from the input type.
§

impl From<GetError> for FailureAction

§

fn from(e: GetError) -> FailureAction

Converts to this type from the input type.
§

impl From<ProgressSendError> for GetError

§

fn from(value: ProgressSendError) -> GetError

Converts to this type from the input type.
§

impl From<ReadError> for GetError

§

fn from(value: ReadError) -> GetError

Converts to this type from the input type.
§

impl From<WriteError> for GetError

§

fn from(value: WriteError) -> GetError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/error/index.html b/pr/2583/docs/iroh/blobs/get/error/index.html index 4a3adf9186..1585987ff9 100644 --- a/pr/2583/docs/iroh/blobs/get/error/index.html +++ b/pr/2583/docs/iroh/blobs/get/error/index.html @@ -1,2 +1,2 @@ -iroh::blobs::get::error - Rust

Module iroh::blobs::get::error

source ·
Expand description

Error returned from get operations

+iroh::blobs::get::error - Rust

Module iroh::blobs::get::error

Expand description

Error returned from get operations

Enums§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/fsm/enum.AtBlobHeaderNextError.html b/pr/2583/docs/iroh/blobs/get/fsm/enum.AtBlobHeaderNextError.html index aad5c22d05..de5828ab7e 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/enum.AtBlobHeaderNextError.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/enum.AtBlobHeaderNextError.html @@ -1,4 +1,4 @@ -AtBlobHeaderNextError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::AtBlobHeaderNextError

source ·
pub enum AtBlobHeaderNextError {
+AtBlobHeaderNextError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::AtBlobHeaderNextError

pub enum AtBlobHeaderNextError {
     NotFound,
     Read(ReadError),
     Io(Error),
@@ -7,7 +7,7 @@
 

This indicates that the provider does not have the requested data.

§

Read(ReadError)

Quinn read error when reading the size header

§

Io(Error)

Generic io error

-

Trait Implementations§

source§

impl Debug for AtBlobHeaderNextError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for AtBlobHeaderNextError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for AtBlobHeaderNextError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AtBlobHeaderNextError> for DecodeError

source§

fn from(cause: AtBlobHeaderNextError) -> DecodeError

Converts to this type from the input type.
source§

impl From<AtBlobHeaderNextError> for GetError

source§

fn from(value: AtBlobHeaderNextError) -> GetError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for AtBlobHeaderNextError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for AtBlobHeaderNextError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for AtBlobHeaderNextError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<AtBlobHeaderNextError> for DecodeError

§

fn from(cause: AtBlobHeaderNextError) -> DecodeError

Converts to this type from the input type.
§

impl From<AtBlobHeaderNextError> for GetError

§

fn from(value: AtBlobHeaderNextError) -> GetError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/enum.BlobContentNext.html b/pr/2583/docs/iroh/blobs/get/fsm/enum.BlobContentNext.html index 64e3d44d45..beffb5fbb3 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/enum.BlobContentNext.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/enum.BlobContentNext.html @@ -1,12 +1,12 @@ -BlobContentNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::BlobContentNext

source ·
pub enum BlobContentNext {
+BlobContentNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::BlobContentNext

pub enum BlobContentNext {
     More((AtBlobContent, Result<BaoContentItem, DecodeError>)),
     Done(AtEndBlob),
 }
Expand description

The next state after reading a content item

Variants§

§

More((AtBlobContent, Result<BaoContentItem, DecodeError>))

We expect more content

§

Done(AtEndBlob)

We are done with this blob

-

Trait Implementations§

source§

impl Debug for BlobContentNext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<(AtBlobContent, Result<BaoContentItem, DecodeError>)> for BlobContentNext

Trait Implementations§

§

impl Debug for BlobContentNext

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<(AtBlobContent, Result<BaoContentItem, DecodeError>)> for BlobContentNext

§

fn from( value: (AtBlobContent, Result<BaoContentItem, DecodeError>) -) -> BlobContentNext

Converts to this type from the input type.
source§

impl From<AtEndBlob> for BlobContentNext

source§

fn from(value: AtEndBlob) -> BlobContentNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +) -> BlobContentNext

Converts to this type from the input type.

§

impl From<AtEndBlob> for BlobContentNext

§

fn from(value: AtEndBlob) -> BlobContentNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNext.html b/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNext.html index eacdb70748..d88cadfec7 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNext.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNext.html @@ -1,4 +1,4 @@ -ConnectedNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::ConnectedNext

source ·
pub enum ConnectedNext {
+ConnectedNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::ConnectedNext

pub enum ConnectedNext {
     StartRoot(AtStartRoot),
     StartChild(AtStartChild),
     Closing(AtClosing),
@@ -6,7 +6,7 @@
 

Variants§

§

StartRoot(AtStartRoot)

First response is either a collection or a single blob

§

StartChild(AtStartChild)

First response is a child

§

Closing(AtClosing)

Request is empty

-

Trait Implementations§

source§

impl Debug for ConnectedNext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<AtClosing> for ConnectedNext

source§

fn from(value: AtClosing) -> ConnectedNext

Converts to this type from the input type.
source§

impl From<AtStartChild> for ConnectedNext

source§

fn from(value: AtStartChild) -> ConnectedNext

Converts to this type from the input type.
source§

impl From<AtStartRoot> for ConnectedNext

source§

fn from(value: AtStartRoot) -> ConnectedNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for ConnectedNext

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<AtClosing> for ConnectedNext

§

fn from(value: AtClosing) -> ConnectedNext

Converts to this type from the input type.
§

impl From<AtStartChild> for ConnectedNext

§

fn from(value: AtStartChild) -> ConnectedNext

Converts to this type from the input type.
§

impl From<AtStartRoot> for ConnectedNext

§

fn from(value: AtStartRoot) -> ConnectedNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNextError.html b/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNextError.html index a18fdc5c9b..879dd5d98f 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNextError.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/enum.ConnectedNextError.html @@ -1,4 +1,4 @@ -ConnectedNextError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::ConnectedNextError

source ·
pub enum ConnectedNextError {
+ConnectedNextError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::ConnectedNextError

pub enum ConnectedNextError {
     PostcardSer(Error),
     RequestTooBig,
     Write(WriteError),
@@ -8,7 +8,7 @@
 
§

RequestTooBig

The serialized request is too long to be sent

§

Write(WriteError)

Error when writing the request to the SendStream.

§

Io(Error)

A generic io error

-

Trait Implementations§

source§

impl Debug for ConnectedNextError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for ConnectedNextError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for ConnectedNextError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<ConnectedNextError> for GetError

source§

fn from(value: ConnectedNextError) -> GetError

Converts to this type from the input type.
source§

impl From<WriteError> for ConnectedNextError

source§

fn from(source: WriteError) -> ConnectedNextError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for ConnectedNextError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ConnectedNextError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for ConnectedNextError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ConnectedNextError> for GetError

§

fn from(value: ConnectedNextError) -> GetError

Converts to this type from the input type.
§

impl From<WriteError> for ConnectedNextError

§

fn from(source: WriteError) -> ConnectedNextError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/enum.DecodeError.html b/pr/2583/docs/iroh/blobs/get/fsm/enum.DecodeError.html index 4656c7447a..c17ad15b37 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/enum.DecodeError.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/enum.DecodeError.html @@ -1,4 +1,4 @@ -DecodeError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::DecodeError

source ·
pub enum DecodeError {
+DecodeError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::DecodeError

pub enum DecodeError {
     NotFound,
     ParentNotFound(TreeNode),
     LeafNotFound(ChunkNum),
@@ -30,7 +30,7 @@
 
§

LeafHashMismatch(ChunkNum)

The hash of a leaf did not match the expected hash

§

Read(ReadError)

Error when reading from the stream

§

Io(Error)

A generic io error

-

Trait Implementations§

source§

impl Debug for DecodeError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for DecodeError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for DecodeError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AtBlobHeaderNextError> for DecodeError

source§

fn from(cause: AtBlobHeaderNextError) -> DecodeError

Converts to this type from the input type.
source§

impl From<DecodeError> for DecodeError

source§

fn from(value: DecodeError) -> DecodeError

Converts to this type from the input type.
source§

impl From<DecodeError> for GetError

source§

fn from(value: DecodeError) -> GetError

Converts to this type from the input type.
source§

impl From<Error> for DecodeError

source§

fn from(source: Error) -> DecodeError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for DecodeError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for DecodeError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<AtBlobHeaderNextError> for DecodeError

§

fn from(cause: AtBlobHeaderNextError) -> DecodeError

Converts to this type from the input type.
§

impl From<DecodeError> for DecodeError

§

fn from(value: DecodeError) -> DecodeError

Converts to this type from the input type.
§

impl From<DecodeError> for GetError

§

fn from(value: DecodeError) -> GetError

Converts to this type from the input type.
§

impl From<Error> for DecodeError

§

fn from(source: Error) -> DecodeError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/enum.EndBlobNext.html b/pr/2583/docs/iroh/blobs/get/fsm/enum.EndBlobNext.html index ed3783ceff..7bf8565dbd 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/enum.EndBlobNext.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/enum.EndBlobNext.html @@ -1,10 +1,10 @@ -EndBlobNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::EndBlobNext

source ·
pub enum EndBlobNext {
+EndBlobNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::EndBlobNext

pub enum EndBlobNext {
     MoreChildren(AtStartChild),
     Closing(AtClosing),
 }
Expand description

The next state after the end of a blob

Variants§

§

MoreChildren(AtStartChild)

Response is expected to have more children

§

Closing(AtClosing)

No more children expected

-

Trait Implementations§

source§

impl Debug for EndBlobNext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<AtClosing> for EndBlobNext

source§

fn from(value: AtClosing) -> EndBlobNext

Converts to this type from the input type.
source§

impl From<AtStartChild> for EndBlobNext

source§

fn from(value: AtStartChild) -> EndBlobNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for EndBlobNext

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<AtClosing> for EndBlobNext

§

fn from(value: AtClosing) -> EndBlobNext

Converts to this type from the input type.
§

impl From<AtStartChild> for EndBlobNext

§

fn from(value: AtStartChild) -> EndBlobNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/fn.start.html b/pr/2583/docs/iroh/blobs/get/fsm/fn.start.html index 8a76011fc9..54fbc2c087 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/fn.start.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/fn.start.html @@ -1,2 +1,2 @@ -start in iroh::blobs::get::fsm - Rust

Function iroh::blobs::get::fsm::start

source ·
pub fn start(connection: Connection, request: GetRequest) -> AtInitial
Expand description

The entry point of the get response machine

+start in iroh::blobs::get::fsm - Rust

Function iroh::blobs::get::fsm::start

pub fn start(connection: Connection, request: GetRequest) -> AtInitial
Expand description

The entry point of the get response machine

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/fsm/index.html b/pr/2583/docs/iroh/blobs/get/fsm/index.html index 658bc38bb5..2314e5dfad 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/index.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/index.html @@ -1,4 +1,4 @@ -iroh::blobs::get::fsm - Rust

Module iroh::blobs::get::fsm

source ·
Expand description

Finite state machine for get responses.

+iroh::blobs::get::fsm - Rust

Module iroh::blobs::get::fsm

Expand description

Finite state machine for get responses.

This is the low level API for getting data from a peer.

diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobContent.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobContent.html index aee4c61679..ec02397938 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobContent.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobContent.html @@ -1,18 +1,18 @@ -AtBlobContent in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtBlobContent

source ·
pub struct AtBlobContent { /* private fields */ }
Expand description

State while we are reading content

-

Implementations§

source§

impl AtBlobContent

source

pub async fn next(self) -> BlobContentNext

Read the next item, either content, an error, or the end of the blob

-
source

pub fn tree(&self) -> BaoTree

The geometry of the tree we are currently reading.

-
source

pub fn hash(&self) -> Hash

The hash of the blob we are reading.

-
source

pub fn offset(&self) -> u64

The current offset of the blob we are reading.

-
source

pub async fn drain(self) -> Result<AtEndBlob, DecodeError>

Drain the response and throw away the result

-
source

pub async fn concatenate_into_vec( +AtBlobContent in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtBlobContent

pub struct AtBlobContent { /* private fields */ }
Expand description

State while we are reading content

+

Implementations§

§

impl AtBlobContent

pub async fn next(self) -> BlobContentNext

Read the next item, either content, an error, or the end of the blob

+

pub fn tree(&self) -> BaoTree

The geometry of the tree we are currently reading.

+

pub fn hash(&self) -> Hash

The hash of the blob we are reading.

+

pub fn offset(&self) -> u64

The current offset of the blob we are reading.

+

pub async fn drain(self) -> Result<AtEndBlob, DecodeError>

Drain the response and throw away the result

+

pub async fn concatenate_into_vec( self ) -> Result<(AtEndBlob, Vec<u8>), DecodeError>

Concatenate the entire response into a vec

-
source

pub async fn write_all_batch<B>( +

pub async fn write_all_batch<B>( self, writer: B ) -> Result<AtEndBlob, DecodeError>
where B: BaoBatchWriter,

Write the entire stream for this blob to a batch writer.

-
source

pub async fn write_all_with_outboard<D, O>( +

pub async fn write_all_with_outboard<D, O>( self, outboard: Option<O>, data: D @@ -21,10 +21,10 @@ O: OutboardMut,

Write the entire blob to a slice writer and to an optional outboard.

The outboard is only written to if the blob is larger than a single chunk group.

-
source

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>
where +

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>

Write the entire blob to a slice writer.

-
source

pub fn finish(self) -> AtClosing

Immediately finish the get response without reading further

-

Trait Implementations§

source§

impl Debug for AtBlobContent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

pub fn finish(self) -> AtClosing

Immediately finish the get response without reading further

+

Trait Implementations§

§

impl Debug for AtBlobContent

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobHeader.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobHeader.html index c9dc0f6914..3237f79cae 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobHeader.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtBlobHeader.html @@ -1,14 +1,14 @@ -AtBlobHeader in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtBlobHeader

source ·
pub struct AtBlobHeader { /* private fields */ }
Expand description

State before reading a size header

-

Implementations§

source§

impl AtBlobHeader

source

pub async fn next(self) -> Result<(AtBlobContent, u64), AtBlobHeaderNextError>

Read the size header, returning it and going into the Content state.

-
source

pub async fn drain(self) -> Result<AtEndBlob, DecodeError>

Drain the response and throw away the result

-
source

pub async fn concatenate_into_vec( +AtBlobHeader in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtBlobHeader

pub struct AtBlobHeader { /* private fields */ }
Expand description

State before reading a size header

+

Implementations§

§

impl AtBlobHeader

pub async fn next(self) -> Result<(AtBlobContent, u64), AtBlobHeaderNextError>

Read the size header, returning it and going into the Content state.

+

pub async fn drain(self) -> Result<AtEndBlob, DecodeError>

Drain the response and throw away the result

+

pub async fn concatenate_into_vec( self ) -> Result<(AtEndBlob, Vec<u8>), DecodeError>

Concatenate the entire response into a vec

For a request that does not request the complete blob, this will just concatenate the ranges that were requested.

-
source

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>
where +

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>

Write the entire blob to a slice writer.

-
source

pub async fn write_all_with_outboard<D, O>( +

pub async fn write_all_with_outboard<D, O>( self, outboard: Option<O>, data: D @@ -17,15 +17,15 @@ O: OutboardMut,

Write the entire blob to a slice writer and to an optional outboard.

The outboard is only written to if the blob is larger than a single chunk group.

-
source

pub async fn write_all_batch<B>( +

pub async fn write_all_batch<B>( self, batch: B ) -> Result<AtEndBlob, DecodeError>
where B: BaoBatchWriter,

Write the entire stream for this blob to a batch writer.

-
source

pub fn hash(&self) -> Hash

The hash of the blob we are reading.

-
source

pub fn ranges(&self) -> &RangeSet<[ChunkNum; 2]>

The ranges we have requested for the current hash.

-
source

pub fn offset(&self) -> u64

The current offset of the blob we are reading.

-

Trait Implementations§

source§

impl Debug for AtBlobHeader

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

pub fn hash(&self) -> Hash

The hash of the blob we are reading.

+

pub fn ranges(&self) -> &RangeSet<[ChunkNum; 2]>

The ranges we have requested for the current hash.

+

pub fn offset(&self) -> u64

The current offset of the blob we are reading.

+

Trait Implementations§

§

impl Debug for AtBlobHeader

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtClosing.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtClosing.html index abe2f73ef7..88bc8ebc35 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtClosing.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtClosing.html @@ -1,6 +1,6 @@ -AtClosing in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtClosing

source ·
pub struct AtClosing { /* private fields */ }
Expand description

State when finishing the get response

-

Implementations§

source§

impl AtClosing

source

pub async fn next(self) -> Result<Stats, ReadError>

Finish the get response, returning statistics

-

Trait Implementations§

source§

impl Debug for AtClosing

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<AtClosing> for ConnectedNext

source§

fn from(value: AtClosing) -> ConnectedNext

Converts to this type from the input type.
source§

impl From<AtClosing> for EndBlobNext

source§

fn from(value: AtClosing) -> EndBlobNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +AtClosing in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtClosing

pub struct AtClosing { /* private fields */ }
Expand description

State when finishing the get response

+

Implementations§

§

impl AtClosing

pub async fn next(self) -> Result<Stats, ReadError>

Finish the get response, returning statistics

+

Trait Implementations§

§

impl Debug for AtClosing

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<AtClosing> for ConnectedNext

§

fn from(value: AtClosing) -> ConnectedNext

Converts to this type from the input type.
§

impl From<AtClosing> for EndBlobNext

§

fn from(value: AtClosing) -> EndBlobNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtConnected.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtConnected.html index 457eb031ae..e3b4400d8d 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtConnected.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtConnected.html @@ -1,9 +1,9 @@ -AtConnected in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtConnected

source ·
pub struct AtConnected { /* private fields */ }
Expand description

State of the get response machine after the handshake has been sent

-

Implementations§

source§

impl AtConnected

source

pub async fn next(self) -> Result<ConnectedNext, ConnectedNextError>

Send the request and move to the next state

+AtConnected in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtConnected

pub struct AtConnected { /* private fields */ }
Expand description

State of the get response machine after the handshake has been sent

+

Implementations§

§

impl AtConnected

pub async fn next(self) -> Result<ConnectedNext, ConnectedNextError>

Send the request and move to the next state

The next state will be either StartRoot or StartChild depending on whether the request requests part of the collection or not.

If the request is empty, this can also move directly to Finished.

-

Trait Implementations§

source§

impl Debug for AtConnected

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for AtConnected

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtEndBlob.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtEndBlob.html index 1162da6d52..0bc882492e 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtEndBlob.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtEndBlob.html @@ -1,6 +1,6 @@ -AtEndBlob in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtEndBlob

source ·
pub struct AtEndBlob { /* private fields */ }
Expand description

State after we have read all the content for a blob

-

Implementations§

source§

impl AtEndBlob

source

pub fn next(self) -> EndBlobNext

Read the next child, or finish

-

Trait Implementations§

source§

impl Debug for AtEndBlob

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<AtEndBlob> for BlobContentNext

source§

fn from(value: AtEndBlob) -> BlobContentNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +AtEndBlob in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtEndBlob

pub struct AtEndBlob { /* private fields */ }
Expand description

State after we have read all the content for a blob

+

Implementations§

§

impl AtEndBlob

pub fn next(self) -> EndBlobNext

Read the next child, or finish

+

Trait Implementations§

§

impl Debug for AtEndBlob

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<AtEndBlob> for BlobContentNext

§

fn from(value: AtEndBlob) -> BlobContentNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtInitial.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtInitial.html index 2d338ad716..faa8d7d687 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtInitial.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtInitial.html @@ -1,9 +1,9 @@ -AtInitial in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtInitial

source ·
pub struct AtInitial { /* private fields */ }
Expand description

Initial state of the get response machine

-

Implementations§

source§

impl AtInitial

source

pub fn new(connection: Connection, request: GetRequest) -> AtInitial

Create a new get response

+AtInitial in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtInitial

pub struct AtInitial { /* private fields */ }
Expand description

Initial state of the get response machine

+

Implementations§

§

impl AtInitial

pub fn new(connection: Connection, request: GetRequest) -> AtInitial

Create a new get response

connection is an existing connection request is the request to be sent

-
source

pub async fn next(self) -> Result<AtConnected, ConnectionError>

Initiate a new bidi stream to use for the get response

-

Trait Implementations§

source§

impl Debug for AtInitial

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

pub async fn next(self) -> Result<AtConnected, ConnectionError>

Initiate a new bidi stream to use for the get response

+

Trait Implementations§

§

impl Debug for AtInitial

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartChild.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartChild.html index 07823e439e..3ba42b77e2 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartChild.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartChild.html @@ -1,16 +1,16 @@ -AtStartChild in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtStartChild

source ·
pub struct AtStartChild { /* private fields */ }
Expand description

State of the get response when we start reading a child

-

Implementations§

source§

impl AtStartChild

source

pub fn child_offset(&self) -> u64

The offset of the child we are currently reading

+AtStartChild in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtStartChild

pub struct AtStartChild { /* private fields */ }
Expand description

State of the get response when we start reading a child

+

Implementations§

§

impl AtStartChild

pub fn child_offset(&self) -> u64

The offset of the child we are currently reading

This must be used to determine the hash needed to call next. If this is larger than the number of children in the collection, you can call finish to stop reading the response.

-
source

pub fn ranges(&self) -> &RangeSet<[ChunkNum; 2]>

The ranges we have requested for the child

-
source

pub fn next(self, hash: Hash) -> AtBlobHeader

Go into the next state, reading the header

+

pub fn ranges(&self) -> &RangeSet<[ChunkNum; 2]>

The ranges we have requested for the child

+

pub fn next(self, hash: Hash) -> AtBlobHeader

Go into the next state, reading the header

This requires passing in the hash of the child for validation

-
source

pub fn finish(self) -> AtClosing

Finish the get response without reading further

+

pub fn finish(self) -> AtClosing

Finish the get response without reading further

This is used if you know that there are no more children from having read the collection, or when you want to stop reading the response early.

-

Trait Implementations§

source§

impl Debug for AtStartChild

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<AtStartChild> for ConnectedNext

source§

fn from(value: AtStartChild) -> ConnectedNext

Converts to this type from the input type.
source§

impl From<AtStartChild> for EndBlobNext

source§

fn from(value: AtStartChild) -> EndBlobNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for AtStartChild

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<AtStartChild> for ConnectedNext

§

fn from(value: AtStartChild) -> ConnectedNext

Converts to this type from the input type.
§

impl From<AtStartChild> for EndBlobNext

§

fn from(value: AtStartChild) -> EndBlobNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartRoot.html b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartRoot.html index b91cef45f1..0ef658b54c 100644 --- a/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartRoot.html +++ b/pr/2583/docs/iroh/blobs/get/fsm/struct.AtStartRoot.html @@ -1,10 +1,10 @@ -AtStartRoot in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtStartRoot

source ·
pub struct AtStartRoot { /* private fields */ }
Expand description

State of the get response when we start reading a collection

-

Implementations§

source§

impl AtStartRoot

source

pub fn ranges(&self) -> &RangeSet<[ChunkNum; 2]>

The ranges we have requested for the child

-
source

pub fn hash(&self) -> Hash

Hash of the root blob

-
source

pub fn next(self) -> AtBlobHeader

Go into the next state, reading the header

+AtStartRoot in iroh::blobs::get::fsm - Rust

Struct iroh::blobs::get::fsm::AtStartRoot

pub struct AtStartRoot { /* private fields */ }
Expand description

State of the get response when we start reading a collection

+

Implementations§

§

impl AtStartRoot

pub fn ranges(&self) -> &RangeSet<[ChunkNum; 2]>

The ranges we have requested for the child

+

pub fn hash(&self) -> Hash

Hash of the root blob

+

pub fn next(self) -> AtBlobHeader

Go into the next state, reading the header

For the collection we already know the hash, since it was part of the request

-
source

pub fn finish(self) -> AtClosing

Finish the get response without reading further

-

Trait Implementations§

source§

impl Debug for AtStartRoot

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<AtStartRoot> for ConnectedNext

source§

fn from(value: AtStartRoot) -> ConnectedNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

pub fn finish(self) -> AtClosing

Finish the get response without reading further

+

Trait Implementations§

§

impl Debug for AtStartRoot

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<AtStartRoot> for ConnectedNext

§

fn from(value: AtStartRoot) -> ConnectedNext

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/index.html b/pr/2583/docs/iroh/blobs/get/index.html index a43f71a4a4..7d9411aa6d 100644 --- a/pr/2583/docs/iroh/blobs/get/index.html +++ b/pr/2583/docs/iroh/blobs/get/index.html @@ -1,4 +1,4 @@ -iroh::blobs::get - Rust

Module iroh::blobs::get

source ·
Expand description

The client side API

+iroh::blobs::get - Rust

Module iroh::blobs::get

Expand description

The client side API

To get data, create a connection using iroh-net or use any quinn connection that was obtained in another way.

Create a request describing the data you want to get.

diff --git a/pr/2583/docs/iroh/blobs/get/progress/enum.BlobProgress.html b/pr/2583/docs/iroh/blobs/get/progress/enum.BlobProgress.html index d241ab64c8..d14faf5c37 100644 --- a/pr/2583/docs/iroh/blobs/get/progress/enum.BlobProgress.html +++ b/pr/2583/docs/iroh/blobs/get/progress/enum.BlobProgress.html @@ -1,4 +1,4 @@ -BlobProgress in iroh::blobs::get::progress - Rust

Enum iroh::blobs::get::progress::BlobProgress

source ·
pub enum BlobProgress {
+BlobProgress in iroh::blobs::get::progress - Rust

Enum iroh::blobs::get::progress::BlobProgress

pub enum BlobProgress {
     Pending,
     Progressing(u64),
     Done,
@@ -6,16 +6,16 @@
 

Variants§

§

Pending

Download is pending

§

Progressing(u64)

Download is in progress

§

Done

Download has finished

-

Trait Implementations§

source§

impl Clone for BlobProgress

source§

fn clone(&self) -> BlobProgress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlobProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for BlobProgress

source§

fn default() -> BlobProgress

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlobProgress

Trait Implementations§

§

impl Clone for BlobProgress

§

fn clone(&self) -> BlobProgress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for BlobProgress

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for BlobProgress

§

fn default() -> BlobProgress

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for BlobProgress

§

fn deserialize<__D>( __deserializer: __D ) -> Result<BlobProgress, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for BlobProgress

source§

fn eq(&self, other: &BlobProgress) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl PartialEq for BlobProgress

§

fn eq(&self, other: &BlobProgress) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlobProgress

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for BlobProgress

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlobProgress

source§

impl StructuralPartialEq for BlobProgress

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for BlobProgress

§

impl StructuralPartialEq for BlobProgress

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/progress/index.html b/pr/2583/docs/iroh/blobs/get/progress/index.html index efcdbe2576..7b36545503 100644 --- a/pr/2583/docs/iroh/blobs/get/progress/index.html +++ b/pr/2583/docs/iroh/blobs/get/progress/index.html @@ -1,2 +1,2 @@ -iroh::blobs::get::progress - Rust

Module iroh::blobs::get::progress

source ·
Expand description

Types for get progress state management.

+iroh::blobs::get::progress - Rust

Module iroh::blobs::get::progress

Expand description

Types for get progress state management.

Structs§

Enums§

Type Aliases§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/progress/struct.BlobState.html b/pr/2583/docs/iroh/blobs/get/progress/struct.BlobState.html index 0f082f4224..40e77b3ec5 100644 --- a/pr/2583/docs/iroh/blobs/get/progress/struct.BlobState.html +++ b/pr/2583/docs/iroh/blobs/get/progress/struct.BlobState.html @@ -1,4 +1,4 @@ -BlobState in iroh::blobs::get::progress - Rust

Struct iroh::blobs::get::progress::BlobState

source ·
pub struct BlobState {
+BlobState in iroh::blobs::get::progress - Rust

Struct iroh::blobs::get::progress::BlobState

pub struct BlobState {
     pub hash: Hash,
     pub size: Option<BaoBlobSize>,
     pub progress: BlobProgress,
@@ -11,17 +11,17 @@
 
§progress: BlobProgress

The current state of the blob transfer.

§local_ranges: Option<RangeSpec>

Ranges already available locally at the time of starting the transfer.

§child_count: Option<u64>

Number of children (only applies to hashseqs, None for raw blobs).

-

Implementations§

source§

impl BlobState

source

pub fn new(hash: Hash) -> BlobState

Create a new BlobState.

-

Trait Implementations§

source§

impl Clone for BlobState

source§

fn clone(&self) -> BlobState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlobState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BlobState

Implementations§

§

impl BlobState

pub fn new(hash: Hash) -> BlobState

Create a new BlobState.

+

Trait Implementations§

§

impl Clone for BlobState

§

fn clone(&self) -> BlobState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for BlobState

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for BlobState

§

fn deserialize<__D>( __deserializer: __D ) -> Result<BlobState, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for BlobState

source§

fn eq(&self, other: &BlobState) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl PartialEq for BlobState

§

fn eq(&self, other: &BlobState) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlobState

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for BlobState

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlobState

source§

impl StructuralPartialEq for BlobState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

§

impl Eq for BlobState

§

impl StructuralPartialEq for BlobState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/progress/struct.TransferState.html b/pr/2583/docs/iroh/blobs/get/progress/struct.TransferState.html index 1eaa8dfaa4..8e498806fc 100644 --- a/pr/2583/docs/iroh/blobs/get/progress/struct.TransferState.html +++ b/pr/2583/docs/iroh/blobs/get/progress/struct.TransferState.html @@ -1,4 +1,4 @@ -TransferState in iroh::blobs::get::progress - Rust

Struct iroh::blobs::get::progress::TransferState

source ·
pub struct TransferState {
+TransferState in iroh::blobs::get::progress - Rust

Struct iroh::blobs::get::progress::TransferState

pub struct TransferState {
     pub root: BlobState,
     pub connected: bool,
     pub children: HashMap<NonZero<u64>, BlobState>,
@@ -10,21 +10,21 @@
 
§children: HashMap<NonZero<u64>, BlobState>

Children if the root blob is a hash seq, empty for raw blobs

§current: Option<BlobId>

Child being transferred at the moment.

§progress_id_to_blob: HashMap<u64, BlobId>

Progress ids for individual blobs.

-

Implementations§

source§

impl TransferState

source

pub fn new(root_hash: Hash) -> TransferState

Create a new, empty transfer state.

-
source§

impl TransferState

source

pub fn root(&self) -> &BlobState

Get state of the root blob of this transfer.

-
source

pub fn get_blob(&self, blob_id: &BlobId) -> Option<&BlobState>

Get a blob state by its BlobId in this transfer.

-
source

pub fn get_current(&self) -> Option<&BlobState>

Get the blob state currently being transferred.

-
source

pub fn on_progress(&mut self, event: DownloadProgress)

Update the state with a new DownloadProgress event for this transfer.

-

Trait Implementations§

source§

impl Clone for TransferState

source§

fn clone(&self) -> TransferState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransferState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransferState

Implementations§

§

impl TransferState

pub fn new(root_hash: Hash) -> TransferState

Create a new, empty transfer state.

+
§

impl TransferState

pub fn root(&self) -> &BlobState

Get state of the root blob of this transfer.

+

pub fn get_blob(&self, blob_id: &BlobId) -> Option<&BlobState>

Get a blob state by its BlobId in this transfer.

+

pub fn get_current(&self) -> Option<&BlobState>

Get the blob state currently being transferred.

+

pub fn on_progress(&mut self, event: DownloadProgress)

Update the state with a new DownloadProgress event for this transfer.

+

Trait Implementations§

§

impl Clone for TransferState

§

fn clone(&self) -> TransferState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for TransferState

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for TransferState

§

fn deserialize<__D>( __deserializer: __D ) -> Result<TransferState, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for TransferState

source§

fn eq(&self, other: &TransferState) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl PartialEq for TransferState

§

fn eq(&self, other: &TransferState) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransferState

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for TransferState

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransferState

source§

impl StructuralPartialEq for TransferState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for TransferState

§

impl StructuralPartialEq for TransferState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/get/progress/type.ProgressId.html b/pr/2583/docs/iroh/blobs/get/progress/type.ProgressId.html index 3c077d5943..1ae2862f1e 100644 --- a/pr/2583/docs/iroh/blobs/get/progress/type.ProgressId.html +++ b/pr/2583/docs/iroh/blobs/get/progress/type.ProgressId.html @@ -1,2 +1,2 @@ -ProgressId in iroh::blobs::get::progress - Rust

Type Alias iroh::blobs::get::progress::ProgressId

source ·
pub type ProgressId = u64;
Expand description

The identifier for progress events.

+ProgressId in iroh::blobs::get::progress - Rust

Type Alias iroh::blobs::get::progress::ProgressId

pub type ProgressId = u64;
Expand description

The identifier for progress events.

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/request/fn.get_chunk_probe.html b/pr/2583/docs/iroh/blobs/get/request/fn.get_chunk_probe.html index 24b3a4537c..fd8856e211 100644 --- a/pr/2583/docs/iroh/blobs/get/request/fn.get_chunk_probe.html +++ b/pr/2583/docs/iroh/blobs/get/request/fn.get_chunk_probe.html @@ -1,4 +1,4 @@ -get_chunk_probe in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_chunk_probe

source ·
pub async fn get_chunk_probe(
+get_chunk_probe in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_chunk_probe

pub async fn get_chunk_probe(
     connection: &Connection,
     hash: &Hash,
     chunk: ChunkNum
diff --git a/pr/2583/docs/iroh/blobs/get/request/fn.get_hash_seq_and_sizes.html b/pr/2583/docs/iroh/blobs/get/request/fn.get_hash_seq_and_sizes.html
index 2360e5f611..8fb1f9c1db 100644
--- a/pr/2583/docs/iroh/blobs/get/request/fn.get_hash_seq_and_sizes.html
+++ b/pr/2583/docs/iroh/blobs/get/request/fn.get_hash_seq_and_sizes.html
@@ -1,4 +1,4 @@
-get_hash_seq_and_sizes in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_hash_seq_and_sizes

source ·
pub async fn get_hash_seq_and_sizes(
+get_hash_seq_and_sizes in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_hash_seq_and_sizes

pub async fn get_hash_seq_and_sizes(
     connection: &Connection,
     hash: &Hash,
     max_size: u64
diff --git a/pr/2583/docs/iroh/blobs/get/request/fn.get_unverified_size.html b/pr/2583/docs/iroh/blobs/get/request/fn.get_unverified_size.html
index aa5e8da332..c8f08b5702 100644
--- a/pr/2583/docs/iroh/blobs/get/request/fn.get_unverified_size.html
+++ b/pr/2583/docs/iroh/blobs/get/request/fn.get_unverified_size.html
@@ -1,4 +1,4 @@
-get_unverified_size in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_unverified_size

source ·
pub async fn get_unverified_size(
+get_unverified_size in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_unverified_size

pub async fn get_unverified_size(
     connection: &Connection,
     hash: &Hash
 ) -> Result<(u64, Stats), Error>
Expand description

Get the claimed size of a blob from a peer.

diff --git a/pr/2583/docs/iroh/blobs/get/request/fn.get_verified_size.html b/pr/2583/docs/iroh/blobs/get/request/fn.get_verified_size.html index 23d8385ea5..efd7e623b6 100644 --- a/pr/2583/docs/iroh/blobs/get/request/fn.get_verified_size.html +++ b/pr/2583/docs/iroh/blobs/get/request/fn.get_verified_size.html @@ -1,4 +1,4 @@ -get_verified_size in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_verified_size

source ·
pub async fn get_verified_size(
+get_verified_size in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_verified_size

pub async fn get_verified_size(
     connection: &Connection,
     hash: &Hash
 ) -> Result<(u64, Stats), Error>
Expand description

Get the verified size of a blob from a peer.

diff --git a/pr/2583/docs/iroh/blobs/get/request/fn.random_hash_seq_ranges.html b/pr/2583/docs/iroh/blobs/get/request/fn.random_hash_seq_ranges.html index e062f2bedf..4f01ebcfeb 100644 --- a/pr/2583/docs/iroh/blobs/get/request/fn.random_hash_seq_ranges.html +++ b/pr/2583/docs/iroh/blobs/get/request/fn.random_hash_seq_ranges.html @@ -1,4 +1,4 @@ -random_hash_seq_ranges in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::random_hash_seq_ranges

source ·
pub fn random_hash_seq_ranges(sizes: &[u64], rng: impl Rng) -> RangeSpecSeq
Expand description

Given a sequence of sizes of children, generate a range spec that selects a +random_hash_seq_ranges in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::random_hash_seq_ranges

pub fn random_hash_seq_ranges(sizes: &[u64], rng: impl Rng) -> RangeSpecSeq
Expand description

Given a sequence of sizes of children, generate a range spec that selects a random chunk of a random child.

The random chunk is chosen uniformly from the chunks of the children, so larger children are more likely to be selected.

diff --git a/pr/2583/docs/iroh/blobs/get/request/index.html b/pr/2583/docs/iroh/blobs/get/request/index.html index 850a52df1b..a3794a9b7a 100644 --- a/pr/2583/docs/iroh/blobs/get/request/index.html +++ b/pr/2583/docs/iroh/blobs/get/request/index.html @@ -1,4 +1,4 @@ -iroh::blobs::get::request - Rust

Module iroh::blobs::get::request

source ·
Expand description

Utilities for complex get requests.

+iroh::blobs::get::request - Rust

Module iroh::blobs::get::request

Expand description

Utilities for complex get requests.

Functions§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/get/struct.Stats.html b/pr/2583/docs/iroh/blobs/get/struct.Stats.html index bbd58ca23c..4e12cf5337 100644 --- a/pr/2583/docs/iroh/blobs/get/struct.Stats.html +++ b/pr/2583/docs/iroh/blobs/get/struct.Stats.html @@ -1,4 +1,4 @@ -Stats in iroh::blobs::get - Rust

Struct iroh::blobs::get::Stats

source ·
pub struct Stats {
+Stats in iroh::blobs::get - Rust

Struct iroh::blobs::get::Stats

pub struct Stats {
     pub bytes_written: u64,
     pub bytes_read: u64,
     pub elapsed: Duration,
@@ -6,17 +6,17 @@
 

Fields§

§bytes_written: u64

The number of bytes written

§bytes_read: u64

The number of bytes read

§elapsed: Duration

The time it took to transfer the data

-

Implementations§

source§

impl Stats

source

pub fn mbits(&self) -> f64

Transfer rate in megabits per second

-

Trait Implementations§

source§

impl Clone for Stats

source§

fn clone(&self) -> Stats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Stats

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Stats

source§

fn default() -> Stats

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Stats

Implementations§

§

impl Stats

pub fn mbits(&self) -> f64

Transfer rate in megabits per second

+

Trait Implementations§

§

impl Clone for Stats

§

fn clone(&self) -> Stats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Stats

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Stats

§

fn default() -> Stats

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for Stats

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Stats, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Stats

source§

fn eq(&self, other: &Stats) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl PartialEq for Stats

§

fn eq(&self, other: &Stats) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Stats

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for Stats

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Stats

source§

impl StructuralPartialEq for Stats

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

§

impl Eq for Stats

§

impl StructuralPartialEq for Stats

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/hashseq/fn.parse_hash_seq.html b/pr/2583/docs/iroh/blobs/hashseq/fn.parse_hash_seq.html index 177b8f7e49..1d61f99f9a 100644 --- a/pr/2583/docs/iroh/blobs/hashseq/fn.parse_hash_seq.html +++ b/pr/2583/docs/iroh/blobs/hashseq/fn.parse_hash_seq.html @@ -1,4 +1,4 @@ -parse_hash_seq in iroh::blobs::hashseq - Rust

Function iroh::blobs::hashseq::parse_hash_seq

source ·
pub async fn parse_hash_seq<'a, R>(
+parse_hash_seq in iroh::blobs::hashseq - Rust

Function iroh::blobs::hashseq::parse_hash_seq

pub async fn parse_hash_seq<'a, R>(
     reader: R
 ) -> Result<(HashSeqStream, u64), Error>
where R: AsyncSliceReader + 'a,
Expand description

Parse a sequence of hashes.

diff --git a/pr/2583/docs/iroh/blobs/hashseq/index.html b/pr/2583/docs/iroh/blobs/hashseq/index.html index 1aefdbd210..cf53ed2ad2 100644 --- a/pr/2583/docs/iroh/blobs/hashseq/index.html +++ b/pr/2583/docs/iroh/blobs/hashseq/index.html @@ -1,2 +1,2 @@ -iroh::blobs::hashseq - Rust

Module iroh::blobs::hashseq

source ·
Expand description

traits related to collections of blobs

+iroh::blobs::hashseq - Rust

Module iroh::blobs::hashseq

Expand description

traits related to collections of blobs

Structs§

Functions§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeq.html b/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeq.html index 7b7ad0123a..ada4f1d990 100644 --- a/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeq.html +++ b/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeq.html @@ -1,13 +1,13 @@ -HashSeq in iroh::blobs::hashseq - Rust

Struct iroh::blobs::hashseq::HashSeq

source ·
pub struct HashSeq(/* private fields */);
Expand description

A sequence of links, backed by a [Bytes] object.

-

Implementations§

source§

impl HashSeq

source

pub fn new(bytes: Bytes) -> Option<HashSeq>

Create a new sequence of hashes.

-
source

pub fn iter(&self) -> impl Iterator<Item = Hash>

Iterate over the hashes in this sequence.

-
source

pub fn len(&self) -> usize

Get the number of hashes in this sequence.

-
source

pub fn is_empty(&self) -> bool

Check if this sequence is empty.

-
source

pub fn get(&self, index: usize) -> Option<Hash>

Get the hash at the given index.

-
source

pub fn pop_front(&mut self) -> Option<Hash>

Get and remove the first hash in this sequence.

-
source

pub fn into_inner(self) -> Bytes

Get the underlying bytes.

-

Trait Implementations§

source§

impl Clone for HashSeq

source§

fn clone(&self) -> HashSeq

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HashSeq

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl FromIterator<Hash> for HashSeq

source§

fn from_iter<T>(iter: T) -> HashSeq
where - T: IntoIterator<Item = Hash>,

Creates a value from an iterator. Read more
source§

impl IntoIterator for HashSeq

§

type Item = Hash

The type of the elements being iterated over.
§

type IntoIter = HashSeqIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <HashSeq as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl TryFrom<Bytes> for HashSeq

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(bytes: Bytes) -> Result<HashSeq, <HashSeq as TryFrom<Bytes>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +HashSeq in iroh::blobs::hashseq - Rust

Struct iroh::blobs::hashseq::HashSeq

pub struct HashSeq(/* private fields */);
Expand description

A sequence of links, backed by a [Bytes] object.

+

Implementations§

§

impl HashSeq

pub fn new(bytes: Bytes) -> Option<HashSeq>

Create a new sequence of hashes.

+

pub fn iter(&self) -> impl Iterator<Item = Hash>

Iterate over the hashes in this sequence.

+

pub fn len(&self) -> usize

Get the number of hashes in this sequence.

+

pub fn is_empty(&self) -> bool

Check if this sequence is empty.

+

pub fn get(&self, index: usize) -> Option<Hash>

Get the hash at the given index.

+

pub fn pop_front(&mut self) -> Option<Hash>

Get and remove the first hash in this sequence.

+

pub fn into_inner(self) -> Bytes

Get the underlying bytes.

+

Trait Implementations§

§

impl Clone for HashSeq

§

fn clone(&self) -> HashSeq

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for HashSeq

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl FromIterator<Hash> for HashSeq

§

fn from_iter<T>(iter: T) -> HashSeq
where + T: IntoIterator<Item = Hash>,

Creates a value from an iterator. Read more
§

impl IntoIterator for HashSeq

§

type Item = Hash

The type of the elements being iterated over.
§

type IntoIter = HashSeqIter

Which kind of iterator are we turning this into?
§

fn into_iter(self) -> <HashSeq as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
§

impl TryFrom<Bytes> for HashSeq

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(bytes: Bytes) -> Result<HashSeq, <HashSeq as TryFrom<Bytes>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqIter.html b/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqIter.html index be45f52079..93f111ecf1 100644 --- a/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqIter.html +++ b/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqIter.html @@ -1,5 +1,5 @@ -HashSeqIter in iroh::blobs::hashseq - Rust

Struct iroh::blobs::hashseq::HashSeqIter

source ·
pub struct HashSeqIter(/* private fields */);
Expand description

Iterator over the hashes in a HashSeq.

-

Trait Implementations§

source§

impl Clone for HashSeqIter

source§

fn clone(&self) -> HashSeqIter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HashSeqIter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Iterator for HashSeqIter

§

type Item = Hash

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<<HashSeqIter as Iterator>::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( +HashSeqIter in iroh::blobs::hashseq - Rust

Struct iroh::blobs::hashseq::HashSeqIter

pub struct HashSeqIter(/* private fields */);
Expand description

Iterator over the hashes in a HashSeq.

+

Trait Implementations§

§

impl Clone for HashSeqIter

§

fn clone(&self) -> HashSeqIter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for HashSeqIter

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Iterator for HashSeqIter

§

type Item = Hash

The type of the elements being iterated over.
§

fn next(&mut self) -> Option<<HashSeqIter as Iterator>::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( &mut self ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usize
where diff --git a/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqStream.html b/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqStream.html index b6c94a43ea..ad26365606 100644 --- a/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqStream.html +++ b/pr/2583/docs/iroh/blobs/hashseq/struct.HashSeqStream.html @@ -1,8 +1,8 @@ -HashSeqStream in iroh::blobs::hashseq - Rust

Struct iroh::blobs::hashseq::HashSeqStream

source ·
pub struct HashSeqStream(/* private fields */);
Expand description

Stream over the hashes in a HashSeq.

+HashSeqStream in iroh::blobs::hashseq - Rust

Struct iroh::blobs::hashseq::HashSeqStream

pub struct HashSeqStream(/* private fields */);
Expand description

Stream over the hashes in a HashSeq.

todo: make this wrap a reader instead of a HashSeq.

-

Implementations§

source§

impl HashSeqStream

source

pub async fn next(&mut self) -> Result<Option<Hash>, Error>

Get the next hash in the sequence.

-
source

pub async fn skip(&mut self, n: u64) -> Result<(), Error>

Skip a number of hashes in the sequence.

-

Trait Implementations§

source§

impl Clone for HashSeqStream

source§

fn clone(&self) -> HashSeqStream

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HashSeqStream

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Implementations§

§

impl HashSeqStream

pub async fn next(&mut self) -> Result<Option<Hash>, Error>

Get the next hash in the sequence.

+

pub async fn skip(&mut self, n: u64) -> Result<(), Error>

Skip a number of hashes in the sequence.

+

Trait Implementations§

§

impl Clone for HashSeqStream

§

fn clone(&self) -> HashSeqStream

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for HashSeqStream

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/index.html b/pr/2583/docs/iroh/blobs/index.html index 3f82274bf4..af1da66c15 100644 --- a/pr/2583/docs/iroh/blobs/index.html +++ b/pr/2583/docs/iroh/blobs/index.html @@ -1,4 +1,4 @@ -iroh::blobs - Rust

Crate iroh::blobs

source ·
Expand description

Blobs layer for iroh.

+iroh::blobs - Rust

Crate iroh::blobs

Expand description

Blobs layer for iroh.

Modules§

§

impl TryFrom<VarInt> for Closed

§

type Error = UnknownErrorCode

The type returned in the event of a conversion error.
§

fn try_from(value: VarInt) -> Result<Closed, <Closed as TryFrom<VarInt>>::Error>

Performs the conversion.
§

impl Copy for Closed

§

impl Eq for Closed

§

impl StructuralPartialEq for Closed

Auto Trait Implementations§

§

impl Freeze for Closed

§

impl RefUnwindSafe for Closed

§

impl Send for Closed

§

impl Sync for Closed

§

impl Unpin for Closed

§

impl UnwindSafe for Closed

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/protocol/enum.Request.html b/pr/2583/docs/iroh/blobs/protocol/enum.Request.html index 34d8291cf9..4e7a85d5fe 100644 --- a/pr/2583/docs/iroh/blobs/protocol/enum.Request.html +++ b/pr/2583/docs/iroh/blobs/protocol/enum.Request.html @@ -1,17 +1,17 @@ -Request in iroh::blobs::protocol - Rust

Enum iroh::blobs::protocol::Request

source ·
pub enum Request {
+Request in iroh::blobs::protocol - Rust

Enum iroh::blobs::protocol::Request

pub enum Request {
     Get(GetRequest),
 }
Expand description

A request to the provider

Variants§

§

Get(GetRequest)

A get request for a blob or collection

-

Trait Implementations§

source§

impl Clone for Request

source§

fn clone(&self) -> Request

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Request

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Request

Trait Implementations§

§

impl Clone for Request

§

fn clone(&self) -> Request

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Request

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Request

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Request, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<GetRequest> for Request

source§

fn from(value: GetRequest) -> Request

Converts to this type from the input type.
source§

impl PartialEq for Request

source§

fn eq(&self, other: &Request) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl From<GetRequest> for Request

§

fn from(value: GetRequest) -> Request

Converts to this type from the input type.
§

impl PartialEq for Request

§

fn eq(&self, other: &Request) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Request

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for Request

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Request

source§

impl StructuralPartialEq for Request

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

§

impl Eq for Request

§

impl StructuralPartialEq for Request

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/protocol/index.html b/pr/2583/docs/iroh/blobs/protocol/index.html index e8858fcab0..b493a1dae3 100644 --- a/pr/2583/docs/iroh/blobs/protocol/index.html +++ b/pr/2583/docs/iroh/blobs/protocol/index.html @@ -1,4 +1,4 @@ -iroh::blobs::protocol - Rust

Module iroh::blobs::protocol

source ·
Expand description

Protocol for transferring content-addressed blobs and collections over quic +iroh::blobs::protocol - Rust

Module iroh::blobs::protocol

Expand description

Protocol for transferring content-addressed blobs and collections over quic connections. This can be used either with normal quic connections when using the quinn crate or with magicsock connections when using the iroh-net crate.

diff --git a/pr/2583/docs/iroh/blobs/protocol/struct.GetRequest.html b/pr/2583/docs/iroh/blobs/protocol/struct.GetRequest.html index 62e454ca0a..1f7877202f 100644 --- a/pr/2583/docs/iroh/blobs/protocol/struct.GetRequest.html +++ b/pr/2583/docs/iroh/blobs/protocol/struct.GetRequest.html @@ -1,27 +1,27 @@ -GetRequest in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::GetRequest

source ·
pub struct GetRequest {
+GetRequest in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::GetRequest

pub struct GetRequest {
     pub hash: Hash,
     pub ranges: RangeSpecSeq,
 }
Expand description

A request

Fields§

§hash: Hash

blake3 hash

§ranges: RangeSpecSeq

The range of data to request

The first element is the parent, all subsequent elements are children.

-

Implementations§

source§

impl GetRequest

source

pub fn new(hash: Hash, ranges: RangeSpecSeq) -> GetRequest

Request a blob or collection with specified ranges

-
source

pub fn all(hash: Hash) -> GetRequest

Request a collection and all its children

-
source

pub fn single(hash: Hash) -> GetRequest

Request just a single blob

-
source

pub fn last_chunk(hash: Hash) -> GetRequest

Request the last chunk of a single blob

+

Implementations§

§

impl GetRequest

pub fn new(hash: Hash, ranges: RangeSpecSeq) -> GetRequest

Request a blob or collection with specified ranges

+

pub fn all(hash: Hash) -> GetRequest

Request a collection and all its children

+

pub fn single(hash: Hash) -> GetRequest

Request just a single blob

+

pub fn last_chunk(hash: Hash) -> GetRequest

Request the last chunk of a single blob

This can be used to get the verified size of a blob.

-
source

pub fn last_chunks(hash: Hash) -> GetRequest

Request the last chunk for all children

+

pub fn last_chunks(hash: Hash) -> GetRequest

Request the last chunk for all children

This can be used to get the verified size of all children.

-

Trait Implementations§

source§

impl Clone for GetRequest

source§

fn clone(&self) -> GetRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GetRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GetRequest

Trait Implementations§

§

impl Clone for GetRequest

§

fn clone(&self) -> GetRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for GetRequest

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for GetRequest

§

fn deserialize<__D>( __deserializer: __D ) -> Result<GetRequest, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<GetRequest> for Request

source§

fn from(value: GetRequest) -> Request

Converts to this type from the input type.
source§

impl PartialEq for GetRequest

source§

fn eq(&self, other: &GetRequest) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<GetRequest> for Request

§

fn from(value: GetRequest) -> Request

Converts to this type from the input type.
§

impl PartialEq for GetRequest

§

fn eq(&self, other: &GetRequest) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GetRequest

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for GetRequest

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GetRequest

source§

impl StructuralPartialEq for GetRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for GetRequest

§

impl StructuralPartialEq for GetRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html b/pr/2583/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html index 6b559eddff..133402a508 100644 --- a/pr/2583/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html +++ b/pr/2583/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html @@ -1,6 +1,6 @@ -NonEmptyRequestRangeSpecIter in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::NonEmptyRequestRangeSpecIter

source ·
pub struct NonEmptyRequestRangeSpecIter<'a> { /* private fields */ }
Expand description

An iterator over blobs in the sequence with a non-empty range specs.

+NonEmptyRequestRangeSpecIter in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::NonEmptyRequestRangeSpecIter

pub struct NonEmptyRequestRangeSpecIter<'a> { /* private fields */ }
Expand description

An iterator over blobs in the sequence with a non-empty range specs.

default is what to use if the children of this RequestRangeSpec are empty.

-

Trait Implementations§

source§

impl<'a> Debug for NonEmptyRequestRangeSpecIter<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'a> Iterator for NonEmptyRequestRangeSpecIter<'a>

§

type Item = (u64, &'a RangeSpec)

The type of the elements being iterated over.
source§

fn next( +

Trait Implementations§

§

impl<'a> Debug for NonEmptyRequestRangeSpecIter<'a>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'a> Iterator for NonEmptyRequestRangeSpecIter<'a>

§

type Item = (u64, &'a RangeSpec)

The type of the elements being iterated over.
§

fn next( &mut self ) -> Option<<NonEmptyRequestRangeSpecIter<'a> as Iterator>::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( &mut self diff --git a/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpec.html b/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpec.html index e7422e73fc..8a6736aad7 100644 --- a/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpec.html +++ b/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpec.html @@ -1,4 +1,4 @@ -RangeSpec in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::RangeSpec

source ·
pub struct RangeSpec(/* private fields */);
Expand description

A chunk range specification as a sequence of chunk offsets.

+RangeSpec in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::RangeSpec

pub struct RangeSpec(/* private fields */);
Expand description

A chunk range specification as a sequence of chunk offsets.

Offsets encode alternating spans starting on 0, where the first span is always deselected.

§Examples:

@@ -29,26 +29,26 @@

§Examples:

This is a SmallVec so we can avoid allocations for the very common case of a single chunk range.

-

Implementations§

source§

impl RangeSpec

source

pub fn new(ranges: impl AsRef<RangeSetRef<ChunkNum>>) -> RangeSpec

Creates a new RangeSpec from a range set.

-
source

pub const EMPTY: RangeSpec = _

A RangeSpec selecting nothing from the blob.

+

Implementations§

§

impl RangeSpec

pub fn new(ranges: impl AsRef<RangeSetRef<ChunkNum>>) -> RangeSpec

Creates a new RangeSpec from a range set.

+

pub const EMPTY: RangeSpec = _

A RangeSpec selecting nothing from the blob.

This is called “empty” because the representation is an empty set.

-
source

pub fn all() -> RangeSpec

Creates a RangeSpec selecting the entire blob.

-
source

pub fn is_empty(&self) -> bool

Checks if this RangeSpec does not select any chunks in the blob.

-
source

pub fn is_all(&self) -> bool

Checks if this RangeSpec selects all chunks in the blob.

-
source

pub fn to_chunk_ranges(&self) -> RangeSet<[ChunkNum; 2]>

Creates a ChunkRanges from this RangeSpec.

-

Trait Implementations§

source§

impl Clone for RangeSpec

source§

fn clone(&self) -> RangeSpec

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RangeSpec

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RangeSpec

pub fn all() -> RangeSpec

Creates a RangeSpec selecting the entire blob.

+

pub fn is_empty(&self) -> bool

Checks if this RangeSpec does not select any chunks in the blob.

+

pub fn is_all(&self) -> bool

Checks if this RangeSpec selects all chunks in the blob.

+

pub fn to_chunk_ranges(&self) -> RangeSet<[ChunkNum; 2]>

Creates a ChunkRanges from this RangeSpec.

+

Trait Implementations§

§

impl Clone for RangeSpec

§

fn clone(&self) -> RangeSpec

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RangeSpec

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for RangeSpec

§

fn deserialize<__D>( __deserializer: __D ) -> Result<RangeSpec, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for RangeSpec

source§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Hash for RangeSpec

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for RangeSpec

source§

fn eq(&self, other: &RangeSpec) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq for RangeSpec

§

fn eq(&self, other: &RangeSpec) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RangeSpec

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for RangeSpec

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RangeSpec

source§

impl StructuralPartialEq for RangeSpec

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

§

impl Eq for RangeSpec

§

impl StructuralPartialEq for RangeSpec

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html b/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html index 22371884de..9d27ef44f8 100644 --- a/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html +++ b/pr/2583/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html @@ -1,4 +1,4 @@ -RangeSpecSeq in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::RangeSpecSeq

source ·
pub struct RangeSpecSeq(/* private fields */);
Expand description

A chunk range specification for a sequence of blobs.

+RangeSpecSeq in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::RangeSpecSeq

pub struct RangeSpecSeq(/* private fields */);
Expand description

A chunk range specification for a sequence of blobs.

To select chunks in a sequence of blobs this is encoded as a sequence of (blob_offset, range_spec) tuples. Offsets are interpreted in an accumulating fashion.

§Example:

Suppose two RangeSpecs range_a and range_b.

@@ -31,45 +31,45 @@

§Example:

This is a smallvec so that we can avoid allocations in the common case of a single child range.

-

Implementations§

source§

impl RangeSpecSeq

source

pub const fn empty() -> RangeSpecSeq

A RangeSpecSeq containing no chunks from any blobs in the sequence.

+

Implementations§

§

impl RangeSpecSeq

pub const fn empty() -> RangeSpecSeq

A RangeSpecSeq containing no chunks from any blobs in the sequence.

RangeSpecSeq::iter, will return an empty range forever.

-
source

pub fn as_single(&self) -> Option<(u64, &RangeSpec)>

If this range seq describes a range for a single item, returns the offset +

pub fn as_single(&self) -> Option<(u64, &RangeSpec)>

If this range seq describes a range for a single item, returns the offset and range spec for that item

-
source

pub fn all() -> RangeSpecSeq

A RangeSpecSeq containing all chunks from all blobs.

+

pub fn all() -> RangeSpecSeq

A RangeSpecSeq containing all chunks from all blobs.

RangeSpecSeq::iter, will return a full range forever.

-
source

pub fn from_ranges( +

pub fn from_ranges( ranges: impl IntoIterator<Item = impl AsRef<RangeSetRef<ChunkNum>>> ) -> RangeSpecSeq

Convenience function to create a RangeSpecSeq from a finite sequence of range sets.

-
source

pub fn from_ranges_infinite( +

pub fn from_ranges_infinite( ranges: impl IntoIterator<Item = impl AsRef<RangeSetRef<ChunkNum>>> ) -> RangeSpecSeq

Convenience function to create a RangeSpecSeq from a sequence of range sets.

Compared to RangeSpecSeq::from_ranges, this will not add an empty range spec at the end, so the final range spec will repeat forever.

-
source

pub fn new(children: impl IntoIterator<Item = RangeSpec>) -> RangeSpecSeq

Creates a new range spec sequence from a sequence of range specs.

+

pub fn new(children: impl IntoIterator<Item = RangeSpec>) -> RangeSpecSeq

Creates a new range spec sequence from a sequence of range specs.

This will merge adjacent range specs with the same value and thus make sure that the resulting sequence is as compact as possible.

-
source

pub fn iter(&self) -> RequestRangeSpecIter<'_>

An infinite iterator of range specs for blobs in the sequence.

+

pub fn iter(&self) -> RequestRangeSpecIter<'_>

An infinite iterator of range specs for blobs in the sequence.

Each item yielded by the iterator is the RangeSpec for a blob in the sequence. Thus the first call to .next() returns the range spec for the first blob, the next call returns the range spec of the second blob, etc.

-
source

pub fn iter_non_empty(&self) -> NonEmptyRequestRangeSpecIter<'_>

An iterator over blobs in the sequence with a non-empty range spec.

+

pub fn iter_non_empty(&self) -> NonEmptyRequestRangeSpecIter<'_>

An iterator over blobs in the sequence with a non-empty range spec.

This iterator will only yield items for blobs which have at least one chunk selected.

This iterator is infinite if the RangeSpecSeq ends on a non-empty RangeSpec, that is all further blobs have selected chunks spans.

-

Trait Implementations§

source§

impl Clone for RangeSpecSeq

source§

fn clone(&self) -> RangeSpecSeq

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RangeSpecSeq

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RangeSpecSeq

Trait Implementations§

§

impl Clone for RangeSpecSeq

§

fn clone(&self) -> RangeSpecSeq

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RangeSpecSeq

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for RangeSpecSeq

§

fn deserialize<__D>( __deserializer: __D ) -> Result<RangeSpecSeq, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for RangeSpecSeq

source§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Hash for RangeSpecSeq

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for RangeSpecSeq

source§

fn eq(&self, other: &RangeSpecSeq) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more

§

impl PartialEq for RangeSpecSeq

§

fn eq(&self, other: &RangeSpecSeq) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RangeSpecSeq

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for RangeSpecSeq

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RangeSpecSeq

source§

impl StructuralPartialEq for RangeSpecSeq

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for RangeSpecSeq

§

impl StructuralPartialEq for RangeSpecSeq

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html b/pr/2583/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html index e0b459aeb1..5bfd63f34a 100644 --- a/pr/2583/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html +++ b/pr/2583/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html @@ -1,5 +1,5 @@ -UnknownErrorCode in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::UnknownErrorCode

source ·
pub struct UnknownErrorCode(/* private fields */);
Expand description

Unknown error_code, can not be converted into Closed.

-

Trait Implementations§

source§

impl Debug for UnknownErrorCode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for UnknownErrorCode

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for UnknownErrorCode

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +UnknownErrorCode in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::UnknownErrorCode

pub struct UnknownErrorCode(/* private fields */);
Expand description

Unknown error_code, can not be converted into Closed.

+

Trait Implementations§

§

impl Debug for UnknownErrorCode

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for UnknownErrorCode

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for UnknownErrorCode

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/provider/enum.AddProgress.html b/pr/2583/docs/iroh/blobs/provider/enum.AddProgress.html index e0b5b5361c..068b935f9a 100644 --- a/pr/2583/docs/iroh/blobs/provider/enum.AddProgress.html +++ b/pr/2583/docs/iroh/blobs/provider/enum.AddProgress.html @@ -1,4 +1,4 @@ -AddProgress in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::AddProgress

source ·
pub enum AddProgress {
+AddProgress in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::AddProgress

pub enum AddProgress {
     Found {
         id: u64,
         name: String,
@@ -35,10 +35,10 @@
 
§tag: Tag

The tag of the added data.

§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

-

Trait Implementations§

source§

impl Debug for AddProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for AddProgress

Trait Implementations§

§

impl Debug for AddProgress

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for AddProgress

§

fn deserialize<__D>( __deserializer: __D ) -> Result<AddProgress, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for AddProgress

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Serialize for AddProgress

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/blobs/provider/enum.Event.html b/pr/2583/docs/iroh/blobs/provider/enum.Event.html index 147621d4a1..81e32d5bc3 100644 --- a/pr/2583/docs/iroh/blobs/provider/enum.Event.html +++ b/pr/2583/docs/iroh/blobs/provider/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::Event

source ·
pub enum Event {
+Event in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::Event

pub enum Event {
     TaggedBlobAdded {
         hash: Hash,
         format: BlobFormat,
@@ -73,7 +73,7 @@
 
§request_id: u64

An identifier uniquely identifying this request.

§stats: Option<Box<TransferStats>>

statistics about the transfer. This is None if the transfer was aborted before any data was sent.

-

Trait Implementations§

source§

impl Clone for Event

source§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Event

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Event

§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Event

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/provider/enum.SentStatus.html b/pr/2583/docs/iroh/blobs/provider/enum.SentStatus.html index 5bb624d02c..75d59f399e 100644 --- a/pr/2583/docs/iroh/blobs/provider/enum.SentStatus.html +++ b/pr/2583/docs/iroh/blobs/provider/enum.SentStatus.html @@ -1,12 +1,12 @@ -SentStatus in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::SentStatus

source ·
pub enum SentStatus {
+SentStatus in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::SentStatus

pub enum SentStatus {
     Sent,
     NotFound,
 }
Expand description

Status of a send operation

Variants§

§

Sent

The requested data was sent

§

NotFound

The requested data was not found

-

Trait Implementations§

source§

impl Clone for SentStatus

source§

fn clone(&self) -> SentStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SentStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq for SentStatus

source§

fn eq(&self, other: &SentStatus) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for SentStatus

§

fn clone(&self) -> SentStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SentStatus

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl PartialEq for SentStatus

§

fn eq(&self, other: &SentStatus) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for SentStatus

source§

impl StructuralPartialEq for SentStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

§

impl Eq for SentStatus

§

impl StructuralPartialEq for SentStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/provider/fn.handle_connection.html b/pr/2583/docs/iroh/blobs/provider/fn.handle_connection.html index ce4bc07961..cfa2cfe5e6 100644 --- a/pr/2583/docs/iroh/blobs/provider/fn.handle_connection.html +++ b/pr/2583/docs/iroh/blobs/provider/fn.handle_connection.html @@ -1,4 +1,4 @@ -handle_connection in iroh::blobs::provider - Rust

Function iroh::blobs::provider::handle_connection

source ·
pub async fn handle_connection<D, E>(
+handle_connection in iroh::blobs::provider - Rust

Function iroh::blobs::provider::handle_connection

pub async fn handle_connection<D, E>(
     connection: Connection,
     db: D,
     events: E,
diff --git a/pr/2583/docs/iroh/blobs/provider/fn.handle_get.html b/pr/2583/docs/iroh/blobs/provider/fn.handle_get.html
index 6bcad90766..7b4ca616a5 100644
--- a/pr/2583/docs/iroh/blobs/provider/fn.handle_get.html
+++ b/pr/2583/docs/iroh/blobs/provider/fn.handle_get.html
@@ -1,4 +1,4 @@
-handle_get in iroh::blobs::provider - Rust

Function iroh::blobs::provider::handle_get

source ·
pub async fn handle_get<D, E>(
+handle_get in iroh::blobs::provider - Rust

Function iroh::blobs::provider::handle_get

pub async fn handle_get<D, E>(
     db: D,
     request: GetRequest,
     writer: ResponseWriter<E>
diff --git a/pr/2583/docs/iroh/blobs/provider/fn.read_request.html b/pr/2583/docs/iroh/blobs/provider/fn.read_request.html
index 4d33cfec0c..9cdd713008 100644
--- a/pr/2583/docs/iroh/blobs/provider/fn.read_request.html
+++ b/pr/2583/docs/iroh/blobs/provider/fn.read_request.html
@@ -1,4 +1,4 @@
-read_request in iroh::blobs::provider - Rust

Function iroh::blobs::provider::read_request

source ·
pub async fn read_request(reader: RecvStream) -> Result<Request, Error>
Expand description

Read the request from the getter.

+read_request in iroh::blobs::provider - Rust

Function iroh::blobs::provider::read_request

pub async fn read_request(reader: RecvStream) -> Result<Request, Error>
Expand description

Read the request from the getter.

Will fail if there is an error while reading, if the reader contains more data than the Request, or if no valid request is sent.

When successful, the buffer is empty after this function call.

diff --git a/pr/2583/docs/iroh/blobs/provider/fn.send_blob.html b/pr/2583/docs/iroh/blobs/provider/fn.send_blob.html index 2ed7949a3c..a5c8ac4e3d 100644 --- a/pr/2583/docs/iroh/blobs/provider/fn.send_blob.html +++ b/pr/2583/docs/iroh/blobs/provider/fn.send_blob.html @@ -1,4 +1,4 @@ -send_blob in iroh::blobs::provider - Rust

Function iroh::blobs::provider::send_blob

source ·
pub async fn send_blob<D, W>(
+send_blob in iroh::blobs::provider - Rust

Function iroh::blobs::provider::send_blob

pub async fn send_blob<D, W>(
     db: &D,
     hash: Hash,
     ranges: &RangeSpec,
diff --git a/pr/2583/docs/iroh/blobs/provider/fn.transfer_collection.html b/pr/2583/docs/iroh/blobs/provider/fn.transfer_collection.html
index 75867664cf..b54b337b6b 100644
--- a/pr/2583/docs/iroh/blobs/provider/fn.transfer_collection.html
+++ b/pr/2583/docs/iroh/blobs/provider/fn.transfer_collection.html
@@ -1,4 +1,4 @@
-transfer_collection in iroh::blobs::provider - Rust

Function iroh::blobs::provider::transfer_collection

source ·
pub async fn transfer_collection<D, E>(
+transfer_collection in iroh::blobs::provider - Rust

Function iroh::blobs::provider::transfer_collection

pub async fn transfer_collection<D, E>(
     request: GetRequest,
     db: &D,
     writer: &mut ResponseWriter<E>,
diff --git a/pr/2583/docs/iroh/blobs/provider/index.html b/pr/2583/docs/iroh/blobs/provider/index.html
index 1a1a4a2b5f..cf284696a6 100644
--- a/pr/2583/docs/iroh/blobs/provider/index.html
+++ b/pr/2583/docs/iroh/blobs/provider/index.html
@@ -1,2 +1,2 @@
-iroh::blobs::provider - Rust

Module iroh::blobs::provider

source ·
Expand description

The server side API

+iroh::blobs::provider - Rust

Module iroh::blobs::provider

Expand description

The server side API

Structs§

  • A helper struct that combines a quinn::SendStream with auxiliary information
  • The stats for a transfer of a collection or blob.

Enums§

  • Progress updates for the add operation.
  • Events emitted by the provider informing about the current status.
  • Status of a send operation

Traits§

Functions§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/provider/struct.ResponseWriter.html b/pr/2583/docs/iroh/blobs/provider/struct.ResponseWriter.html index c31d8e09f6..2c412e83d9 100644 --- a/pr/2583/docs/iroh/blobs/provider/struct.ResponseWriter.html +++ b/pr/2583/docs/iroh/blobs/provider/struct.ResponseWriter.html @@ -1,6 +1,6 @@ -ResponseWriter in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::ResponseWriter

source ·
pub struct ResponseWriter<E> { /* private fields */ }
Expand description

A helper struct that combines a quinn::SendStream with auxiliary information

-

Trait Implementations§

source§

impl<E> Debug for ResponseWriter<E>
where - E: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<E> Freeze for ResponseWriter<E>
where +ResponseWriter in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::ResponseWriter

pub struct ResponseWriter<E> { /* private fields */ }
Expand description

A helper struct that combines a quinn::SendStream with auxiliary information

+

Trait Implementations§

§

impl<E> Debug for ResponseWriter<E>
where + E: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<E> Freeze for ResponseWriter<E>
where E: Freeze,

§

impl<E> !RefUnwindSafe for ResponseWriter<E>

§

impl<E> Send for ResponseWriter<E>
where E: Send,

§

impl<E> Sync for ResponseWriter<E>
where E: Sync,

§

impl<E> Unpin for ResponseWriter<E>
where diff --git a/pr/2583/docs/iroh/blobs/provider/struct.TransferStats.html b/pr/2583/docs/iroh/blobs/provider/struct.TransferStats.html index 17757c21e6..5f5158e90e 100644 --- a/pr/2583/docs/iroh/blobs/provider/struct.TransferStats.html +++ b/pr/2583/docs/iroh/blobs/provider/struct.TransferStats.html @@ -1,4 +1,4 @@ -TransferStats in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::TransferStats

source ·
pub struct TransferStats {
+TransferStats in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::TransferStats

pub struct TransferStats {
     pub send: StreamWriterStats,
     pub read: SliceReaderStats,
     pub duration: Duration,
@@ -6,7 +6,7 @@
 

Fields§

§send: StreamWriterStats

Stats for sending to the client.

§read: SliceReaderStats

Stats for reading from disk.

§duration: Duration

The total duration of the transfer.

-

Trait Implementations§

source§

impl Clone for TransferStats

source§

fn clone(&self) -> TransferStats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransferStats

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for TransferStats

source§

fn default() -> TransferStats

Returns the “default value” for a type. Read more
source§

impl Copy for TransferStats

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for TransferStats

§

fn clone(&self) -> TransferStats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for TransferStats

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for TransferStats

§

fn default() -> TransferStats

Returns the “default value” for a type. Read more
§

impl Copy for TransferStats

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/provider/trait.EventSender.html b/pr/2583/docs/iroh/blobs/provider/trait.EventSender.html index 72a4acb137..5b5c139721 100644 --- a/pr/2583/docs/iroh/blobs/provider/trait.EventSender.html +++ b/pr/2583/docs/iroh/blobs/provider/trait.EventSender.html @@ -1,6 +1,6 @@ -EventSender in iroh::blobs::provider - Rust

Trait iroh::blobs::provider::EventSender

source ·
pub trait EventSender: Debug + Clone + Sync + Send + 'static {
+EventSender in iroh::blobs::provider - Rust

Trait iroh::blobs::provider::EventSender

pub trait EventSender: Debug + Clone + Sync + Send + 'static {
     // Required method
     fn send(&self, event: Event) -> Pin<Box<dyn Future<Output = ()> + Send>>;
 }
Expand description

Trait for sending events.

-

Required Methods§

source

fn send(&self, event: Event) -> Pin<Box<dyn Future<Output = ()> + Send>>

Send an event.

+

Required Methods§

fn send(&self, event: Event) -> Pin<Box<dyn Future<Output = ()> + Send>>

Send an event.

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/bao_tree/blake3/struct.Hash.html b/pr/2583/docs/iroh/blobs/store/bao_tree/blake3/struct.Hash.html index 102126f42e..047a0257e8 100644 --- a/pr/2583/docs/iroh/blobs/store/bao_tree/blake3/struct.Hash.html +++ b/pr/2583/docs/iroh/blobs/store/bao_tree/blake3/struct.Hash.html @@ -27,7 +27,7 @@ error.

Note that Hash also implements FromStr, so Hash::from_hex("...") is equivalent to "...".parse().

-

Trait Implementations§

§

impl Clone for Hash

§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<[u8; 32]> for Hash

§

fn from(bytes: [u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

fn from(hash: Hash) -> [u8; 32]

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl FromStr for Hash

§

type Err = HexError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for Hash

§

fn hash<__H>(&self, state: &mut __H)
where +

Trait Implementations§

§

impl Clone for Hash

§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<[u8; 32]> for Hash

§

fn from(bytes: [u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

fn from(hash: Hash) -> [u8; 32]

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl FromStr for Hash

§

type Err = HexError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for Hash

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq<[u8]> for Hash

This implementation is constant-time if the target is 32 bytes long.

diff --git a/pr/2583/docs/iroh/blobs/store/bao_tree/io/enum.DecodeError.html b/pr/2583/docs/iroh/blobs/store/bao_tree/io/enum.DecodeError.html index 678597ac3f..189b232005 100644 --- a/pr/2583/docs/iroh/blobs/store/bao_tree/io/enum.DecodeError.html +++ b/pr/2583/docs/iroh/blobs/store/bao_tree/io/enum.DecodeError.html @@ -10,7 +10,7 @@
§

ParentHashMismatch(TreeNode)

The hash of a parent did not match the expected hash

§

LeafHashMismatch(ChunkNum)

The hash of a leaf did not match the expected hash

§

Io(Error)

There was an error reading from the underlying io

-

Trait Implementations§

§

impl Debug for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for DecodeError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<DecodeError> for DecodeError

source§

fn from(value: DecodeError) -> DecodeError

Converts to this type from the input type.
source§

impl From<DecodeError> for GetResponseError

source§

fn from(cause: DecodeError) -> GetResponseError

Converts to this type from the input type.
§

impl From<Error> for DecodeError

§

fn from(e: Error) -> DecodeError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for DecodeError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for DecodeError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<DecodeError> for DecodeError

§

fn from(value: DecodeError) -> DecodeError

Converts to this type from the input type.
§

impl From<DecodeError> for GetResponseError

§

fn from(cause: DecodeError) -> GetResponseError

Converts to this type from the input type.
§

impl From<Error> for DecodeError

§

fn from(e: Error) -> DecodeError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/bao_tree/io/fsm/trait.AsyncSliceWriter.html b/pr/2583/docs/iroh/blobs/store/bao_tree/io/fsm/trait.AsyncSliceWriter.html index 2690283825..b9b4109b6f 100644 --- a/pr/2583/docs/iroh/blobs/store/bao_tree/io/fsm/trait.AsyncSliceWriter.html +++ b/pr/2583/docs/iroh/blobs/store/bao_tree/io/fsm/trait.AsyncSliceWriter.html @@ -55,8 +55,8 @@ data: Bytes ) -> Result<(), Error>

§

async fn set_len(&mut self, len: u64) -> Result<(), Error>

§

async fn sync(&mut self) -> Result<(), Error>

Implementors§

§

impl AsyncSliceWriter for File

§

impl<W> AsyncSliceWriter for ConcatenateSliceWriter<W>
where W: AsyncWrite + Unpin + 'static,

§

impl<W> AsyncSliceWriter for TrackingSliceWriter<W>
where - W: AsyncSliceWriter,

source§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where + W: AsyncSliceWriter,

§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where W: AsyncSliceWriter + 'static, - F: Fn(u64, usize) -> Result<(), Error> + 'static,

source§

impl<W, F> AsyncSliceWriter for ProgressSliceWriter<W, F>
where + F: Fn(u64, usize) -> Result<(), Error> + 'static,

§

impl<W, F> AsyncSliceWriter for ProgressSliceWriter<W, F>
where W: AsyncSliceWriter + 'static, F: FnMut(u64, usize) + 'static,

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.ReadAt.html b/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.ReadAt.html index b5cd11db11..ada0f6ed79 100644 --- a/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.ReadAt.html +++ b/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.ReadAt.html @@ -35,5 +35,5 @@

§Examples

R: ReadAt,

source§

fn read_at(&self, pos: u64, buf: &mut [u8]) -> Result<usize, Error>

source§

impl<'a, R> ReadAt for &'a R
where R: ReadAt + ?Sized,

source§

fn read_at(&self, pos: u64, buf: &mut [u8]) -> Result<usize, Error>

source§

impl<'a, R> ReadAt for &'a mut R
where R: ReadAt + ?Sized,

source§

fn read_at(&self, pos: u64, buf: &mut [u8]) -> Result<usize, Error>

source§

impl<R> ReadAt for Box<R>
where - R: ReadAt + ?Sized,

source§

fn read_at(&self, pos: u64, buf: &mut [u8]) -> Result<usize, Error>

Implementors§

source§

fn read_at(&self, pos: u64, buf: &mut [u8]) -> Result<usize, Error>

Implementors§

§

impl ReadAt for MemOrFile<Bytes, File>

§

impl ReadAt for SparseMemFile

source§

impl ReadAt for RandomAccessFile

source§

impl<I> ReadAt for Slice<I>
where I: ReadAt,

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.Size.html b/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.Size.html index e1421e235b..4159ebe6d3 100644 --- a/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.Size.html +++ b/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.Size.html @@ -25,4 +25,4 @@

§Examples

S: Size,

source§

impl<'a, S> Size for &'a S
where S: Size + ?Sized,

source§

impl<'a, S> Size for &'a mut S
where S: Size + ?Sized,

source§

impl<S> Size for Box<S>
where - S: Size + ?Sized,

Implementors§

\ No newline at end of file + S: Size + ?Sized,

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.WriteAt.html b/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.WriteAt.html index 1392fefd88..6aa1759865 100644 --- a/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.WriteAt.html +++ b/pr/2583/docs/iroh/blobs/store/bao_tree/io/sync/trait.WriteAt.html @@ -41,5 +41,5 @@

§Examples

Implementations on Foreign Types§

source§

impl WriteAt for Vec<u8>

source§

fn write_at(&mut self, pos: u64, buf: &[u8]) -> Result<usize, Error>

source§

fn flush(&mut self) -> Result<(), Error>

source§

impl WriteAt for File

source§

fn write_at(&mut self, pos: u64, buf: &[u8]) -> Result<usize, Error>

source§

fn flush(&mut self) -> Result<(), Error>

source§

impl<'a> WriteAt for &'a mut [u8]

source§

fn write_at(&mut self, pos: u64, buf: &[u8]) -> Result<usize, Error>

source§

fn flush(&mut self) -> Result<(), Error>

source§

impl<'a, W> WriteAt for &'a RefCell<W>
where W: WriteAt,

source§

fn write_at(&mut self, pos: u64, buf: &[u8]) -> Result<usize, Error>

source§

fn flush(&mut self) -> Result<(), Error>

source§

impl<'a, W> WriteAt for &'a mut W
where W: WriteAt + ?Sized,

source§

fn write_at(&mut self, pos: u64, buf: &[u8]) -> Result<usize, Error>

source§

fn flush(&mut self) -> Result<(), Error>

source§

impl<R> WriteAt for Box<R>
where - R: WriteAt + ?Sized,

source§

fn write_at(&mut self, pos: u64, buf: &[u8]) -> Result<usize, Error>

source§

fn flush(&mut self) -> Result<(), Error>

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/enum.BaoBlobSize.html b/pr/2583/docs/iroh/blobs/store/enum.BaoBlobSize.html index ce25379032..a0b4675f46 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.BaoBlobSize.html +++ b/pr/2583/docs/iroh/blobs/store/enum.BaoBlobSize.html @@ -1,21 +1,21 @@ -BaoBlobSize in iroh::blobs::store - Rust

Enum iroh::blobs::store::BaoBlobSize

source ·
pub enum BaoBlobSize {
+BaoBlobSize in iroh::blobs::store - Rust

Enum iroh::blobs::store::BaoBlobSize

pub enum BaoBlobSize {
     Unverified(u64),
     Verified(u64),
 }
Expand description

The size of a bao file

Variants§

§

Unverified(u64)

A remote side told us the size, but we have insufficient data to verify it.

§

Verified(u64)

We have verified the size.

-

Implementations§

source§

impl BaoBlobSize

source

pub fn new(size: u64, verified: bool) -> BaoBlobSize

Create a new BaoFileSize with the given size and verification status.

-
source

pub fn value(&self) -> u64

Get just the value, no matter if it is verified or not.

-

Trait Implementations§

source§

impl Clone for BaoBlobSize

source§

fn clone(&self) -> BaoBlobSize

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BaoBlobSize

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BaoBlobSize

Implementations§

§

impl BaoBlobSize

pub fn new(size: u64, verified: bool) -> BaoBlobSize

Create a new BaoFileSize with the given size and verification status.

+

pub fn value(&self) -> u64

Get just the value, no matter if it is verified or not.

+

Trait Implementations§

§

impl Clone for BaoBlobSize

§

fn clone(&self) -> BaoBlobSize

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for BaoBlobSize

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for BaoBlobSize

§

fn deserialize<__D>( __deserializer: __D ) -> Result<BaoBlobSize, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for BaoBlobSize

source§

fn eq(&self, other: &BaoBlobSize) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§

impl PartialEq for BaoBlobSize

§

fn eq(&self, other: &BaoBlobSize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BaoBlobSize

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for BaoBlobSize

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BaoBlobSize

source§

impl Eq for BaoBlobSize

source§

impl StructuralPartialEq for BaoBlobSize

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for BaoBlobSize

§

impl Eq for BaoBlobSize

§

impl StructuralPartialEq for BaoBlobSize

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html b/pr/2583/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html index 06716dea26..2e059a5183 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html @@ -1,4 +1,4 @@ -ConsistencyCheckProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ConsistencyCheckProgress

source ·
pub enum ConsistencyCheckProgress {
+ConsistencyCheckProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ConsistencyCheckProgress

pub enum ConsistencyCheckProgress {
     Start,
     Update {
         message: String,
@@ -15,10 +15,10 @@
 
§level: ReportLevel

The level of the message

§

Done

Consistency check ended

§

Abort(RpcError)

We got an error and need to abort.

-

Trait Implementations§

source§

impl Debug for ConsistencyCheckProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ConsistencyCheckProgress

Trait Implementations§

§

impl Debug for ConsistencyCheckProgress

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ConsistencyCheckProgress

§

fn deserialize<__D>( __deserializer: __D ) -> Result<ConsistencyCheckProgress, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ConsistencyCheckProgress

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for ConsistencyCheckProgress

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.EntryStatus.html b/pr/2583/docs/iroh/blobs/store/enum.EntryStatus.html index 96de747c9a..3550aa4df0 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.EntryStatus.html +++ b/pr/2583/docs/iroh/blobs/store/enum.EntryStatus.html @@ -1,4 +1,4 @@ -EntryStatus in iroh::blobs::store - Rust

Enum iroh::blobs::store::EntryStatus

source ·
pub enum EntryStatus {
+EntryStatus in iroh::blobs::store - Rust

Enum iroh::blobs::store::EntryStatus

pub enum EntryStatus {
     Complete,
     Partial,
     NotFound,
@@ -6,9 +6,9 @@
 

Variants§

§

Complete

The entry is completely available.

§

Partial

The entry is partially available.

§

NotFound

The entry is not in the store.

-

Trait Implementations§

source§

impl Clone for EntryStatus

source§

fn clone(&self) -> EntryStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EntryStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq for EntryStatus

source§

fn eq(&self, other: &EntryStatus) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for EntryStatus

§

fn clone(&self) -> EntryStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for EntryStatus

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl PartialEq for EntryStatus

§

fn eq(&self, other: &EntryStatus) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for EntryStatus

source§

impl StructuralPartialEq for EntryStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

§

impl Eq for EntryStatus

§

impl StructuralPartialEq for EntryStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.Event.html b/pr/2583/docs/iroh/blobs/store/enum.Event.html index 7e72e09c08..fbb86911d6 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.Event.html +++ b/pr/2583/docs/iroh/blobs/store/enum.Event.html @@ -1,12 +1,12 @@ -Event in iroh::blobs::store - Rust

Enum iroh::blobs::store::Event

source ·
pub enum Event {
+Event in iroh::blobs::store - Rust

Enum iroh::blobs::store::Event

pub enum Event {
     GcStarted,
     GcCompleted,
 }
Expand description

Database events

Variants§

§

GcStarted

A GC was started

§

GcCompleted

A GC was completed

-

Trait Implementations§

source§

impl Clone for Event

source§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Event

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq for Event

source§

fn eq(&self, other: &Event) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for Event

§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Event

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl PartialEq for Event

§

fn eq(&self, other: &Event) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for Event

source§

impl StructuralPartialEq for Event

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

§

impl Eq for Event

§

impl StructuralPartialEq for Event

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ExportFormat.html b/pr/2583/docs/iroh/blobs/store/enum.ExportFormat.html index cd96e47215..e3a99a118d 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ExportFormat.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ExportFormat.html @@ -1,4 +1,4 @@ -ExportFormat in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportFormat

source ·
pub enum ExportFormat {
+ExportFormat in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportFormat

pub enum ExportFormat {
     Blob,
     Collection,
 }
Expand description

The expected format of a hash being exported.

@@ -10,10 +10,10 @@ a file each, with their collection name treated as a relative path to the export destination path.

If the blob cannot be parsed as a collection, the operation will fail.

-

Trait Implementations§

source§

impl Clone for ExportFormat

source§

fn clone(&self) -> ExportFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExportFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ExportFormat

source§

fn default() -> ExportFormat

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ExportFormat

Trait Implementations§

§

impl Clone for ExportFormat

§

fn clone(&self) -> ExportFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ExportFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for ExportFormat

§

fn default() -> ExportFormat

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for ExportFormat

§

fn deserialize<__D>( __deserializer: __D ) -> Result<ExportFormat, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ExportFormat

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Serialize for ExportFormat

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ExportMode.html b/pr/2583/docs/iroh/blobs/store/enum.ExportMode.html index 188a33af76..e237b724aa 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ExportMode.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ExportMode.html @@ -1,4 +1,4 @@ -ExportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportMode

source ·
pub enum ExportMode {
+ExportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportMode

pub enum ExportMode {
     Copy,
     TryReference,
 }
Expand description

The import mode describes how files will be imported.

@@ -15,16 +15,16 @@ the file might be modified in the target directory after it has been exported.

Stores are allowed to ignore this mode and always copy the file, e.g. if the file is very small or if the store does not support referencing files.

-

Trait Implementations§

source§

impl Clone for ExportMode

source§

fn clone(&self) -> ExportMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExportMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ExportMode

source§

fn default() -> ExportMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ExportMode

Trait Implementations§

§

impl Clone for ExportMode

§

fn clone(&self) -> ExportMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ExportMode

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for ExportMode

§

fn default() -> ExportMode

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for ExportMode

§

fn deserialize<__D>( __deserializer: __D ) -> Result<ExportMode, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for ExportMode

source§

fn eq(&self, other: &ExportMode) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl PartialEq for ExportMode

§

fn eq(&self, other: &ExportMode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ExportMode

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for ExportMode

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for ExportMode

source§

impl Eq for ExportMode

source§

impl StructuralPartialEq for ExportMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for ExportMode

§

impl Eq for ExportMode

§

impl StructuralPartialEq for ExportMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ExportProgress.html b/pr/2583/docs/iroh/blobs/store/enum.ExportProgress.html index abbfe52349..020f15edc3 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ExportProgress.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ExportProgress.html @@ -1,4 +1,4 @@ -ExportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportProgress

source ·
pub enum ExportProgress {
+ExportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportProgress

pub enum ExportProgress {
     Start {
         id: u64,
         hash: Hash,
@@ -18,7 +18,7 @@
 

This will be omitted if the store can move the file or use copy on write

There will be multiple of these messages for an id

Fields

§id: u64
§offset: u64
§

Done

Done exporting

-

Fields

§id: u64

Trait Implementations§

source§

impl Debug for ExportProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Fields

§id: u64

Trait Implementations§

§

impl Debug for ExportProgress

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.GcMarkEvent.html b/pr/2583/docs/iroh/blobs/store/enum.GcMarkEvent.html index 85850ae5df..10b49d5638 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.GcMarkEvent.html +++ b/pr/2583/docs/iroh/blobs/store/enum.GcMarkEvent.html @@ -1,4 +1,4 @@ -GcMarkEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcMarkEvent

source ·
pub enum GcMarkEvent {
+GcMarkEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcMarkEvent

pub enum GcMarkEvent {
     CustomDebug(String),
     CustomWarning(String, Option<Error>),
     Error(Error),
@@ -6,7 +6,7 @@
 

Variants§

§

CustomDebug(String)

A custom event (info)

§

CustomWarning(String, Option<Error>)

A custom non critical error

§

Error(Error)

An unrecoverable error during GC

-

Trait Implementations§

source§

impl Debug for GcMarkEvent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for GcMarkEvent

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.GcSweepEvent.html b/pr/2583/docs/iroh/blobs/store/enum.GcSweepEvent.html index 3c9dafc970..f50dd12b64 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.GcSweepEvent.html +++ b/pr/2583/docs/iroh/blobs/store/enum.GcSweepEvent.html @@ -1,4 +1,4 @@ -GcSweepEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcSweepEvent

source ·
pub enum GcSweepEvent {
+GcSweepEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcSweepEvent

pub enum GcSweepEvent {
     CustomDebug(String),
     CustomWarning(String, Option<Error>),
     Error(Error),
@@ -6,7 +6,7 @@
 

Variants§

§

CustomDebug(String)

A custom event (debug)

§

CustomWarning(String, Option<Error>)

A custom non critical error

§

Error(Error)

An unrecoverable error during GC

-

Trait Implementations§

source§

impl Debug for GcSweepEvent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for GcSweepEvent

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ImportMode.html b/pr/2583/docs/iroh/blobs/store/enum.ImportMode.html index 9d194a6ac4..832e9f1f46 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ImportMode.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ImportMode.html @@ -1,4 +1,4 @@ -ImportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportMode

source ·
pub enum ImportMode {
+ImportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportMode

pub enum ImportMode {
     Copy,
     TryReference,
 }
Expand description

The import mode describes how files will be imported.

@@ -14,9 +14,9 @@ the file might be modified after it has been imported.

Stores are allowed to ignore this mode and always copy the file, e.g. if the file is very small or if the store does not support referencing files.

-

Trait Implementations§

source§

impl Clone for ImportMode

source§

fn clone(&self) -> ImportMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ImportMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ImportMode

source§

fn default() -> ImportMode

Returns the “default value” for a type. Read more
source§

impl PartialEq for ImportMode

source§

fn eq(&self, other: &ImportMode) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for ImportMode

§

fn clone(&self) -> ImportMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ImportMode

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for ImportMode

§

fn default() -> ImportMode

Returns the “default value” for a type. Read more
§

impl PartialEq for ImportMode

§

fn eq(&self, other: &ImportMode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for ImportMode

source§

impl Eq for ImportMode

source§

impl StructuralPartialEq for ImportMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

§

impl Copy for ImportMode

§

impl Eq for ImportMode

§

impl StructuralPartialEq for ImportMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ImportProgress.html b/pr/2583/docs/iroh/blobs/store/enum.ImportProgress.html index 6d2f5183cf..2f48e870d6 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ImportProgress.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ImportProgress.html @@ -1,4 +1,4 @@ -ImportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportProgress

source ·
pub enum ImportProgress {
+ImportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportProgress

pub enum ImportProgress {
     Found {
         id: u64,
         name: String,
@@ -35,7 +35,7 @@
 

There will be multiple of these messages for an id

Fields

§id: u64
§offset: u64
§

OutboardDone

Done computing the outboard

This comes after Size and zero or more OutboardProgress messages

-

Fields

§id: u64
§hash: Hash

Trait Implementations§

source§

impl Debug for ImportProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Fields

§id: u64
§hash: Hash

Trait Implementations§

§

impl Debug for ImportProgress

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ReportLevel.html b/pr/2583/docs/iroh/blobs/store/enum.ReportLevel.html index 4fcd535210..2a7a235eed 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ReportLevel.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ReportLevel.html @@ -1,4 +1,4 @@ -ReportLevel in iroh::blobs::store - Rust

Enum iroh::blobs::store::ReportLevel

source ·
pub enum ReportLevel {
+ReportLevel in iroh::blobs::store - Rust

Enum iroh::blobs::store::ReportLevel

pub enum ReportLevel {
     Trace,
     Info,
     Warn,
@@ -8,21 +8,21 @@
 
§

Info

Info messages

§

Warn

Warnings, something is not quite right

§

Error

Errors, something is very wrong

-

Trait Implementations§

source§

impl Clone for ReportLevel

source§

fn clone(&self) -> ReportLevel

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ReportLevel

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ReportLevel

Trait Implementations§

§

impl Clone for ReportLevel

§

fn clone(&self) -> ReportLevel

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ReportLevel

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ReportLevel

§

fn deserialize<__D>( __deserializer: __D ) -> Result<ReportLevel, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for ReportLevel

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Ord for ReportLevel

source§

fn cmp(&self, other: &ReportLevel) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for ReportLevel

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Ord for ReportLevel

§

fn cmp(&self, other: &ReportLevel) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for ReportLevel

source§

fn eq(&self, other: &ReportLevel) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

§

impl PartialEq for ReportLevel

§

fn eq(&self, other: &ReportLevel) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for ReportLevel

source§

fn partial_cmp(&self, other: &ReportLevel) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for ReportLevel

§

fn partial_cmp(&self, other: &ReportLevel) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for ReportLevel

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for ReportLevel

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for ReportLevel

source§

impl Eq for ReportLevel

source§

impl StructuralPartialEq for ReportLevel

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

§

impl Copy for ReportLevel

§

impl Eq for ReportLevel

§

impl StructuralPartialEq for ReportLevel

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/store/enum.ValidateProgress.html b/pr/2583/docs/iroh/blobs/store/enum.ValidateProgress.html index 8b2a925b12..70945d2685 100644 --- a/pr/2583/docs/iroh/blobs/store/enum.ValidateProgress.html +++ b/pr/2583/docs/iroh/blobs/store/enum.ValidateProgress.html @@ -1,4 +1,4 @@ -ValidateProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ValidateProgress

source ·
pub enum ValidateProgress {
+ValidateProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ValidateProgress

pub enum ValidateProgress {
     Starting {
         total: u64,
     },
@@ -63,10 +63,10 @@
 
§ranges: RangeSpec

Available ranges.

§

AllDone

We are done with the whole operation.

§

Abort(RpcError)

We got an error and need to abort.

-

Trait Implementations§

source§

impl Debug for ValidateProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ValidateProgress

Trait Implementations§

§

impl Debug for ValidateProgress

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ValidateProgress

§

fn deserialize<__D>( __deserializer: __D ) -> Result<ValidateProgress, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ValidateProgress

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for ValidateProgress

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/blobs/store/fs/index.html b/pr/2583/docs/iroh/blobs/store/fs/index.html index 0576e9709f..ff8d4807f1 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/index.html +++ b/pr/2583/docs/iroh/blobs/store/fs/index.html @@ -1,4 +1,4 @@ -iroh::blobs::store::fs - Rust

Module iroh::blobs::store::fs

source ·
Expand description

redb backed storage

+iroh::blobs::store::fs - Rust

Module iroh::blobs::store::fs

Expand description

redb backed storage

Data can get into the store in two ways:

  1. import from local data
  2. diff --git a/pr/2583/docs/iroh/blobs/store/fs/struct.BatchOptions.html b/pr/2583/docs/iroh/blobs/store/fs/struct.BatchOptions.html index 5da84478c3..ee8f6c0666 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/struct.BatchOptions.html +++ b/pr/2583/docs/iroh/blobs/store/fs/struct.BatchOptions.html @@ -1,4 +1,4 @@ -BatchOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::BatchOptions

    source ·
    pub struct BatchOptions {
    +BatchOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::BatchOptions

    pub struct BatchOptions {
         pub max_read_batch: usize,
         pub max_read_duration: Duration,
         pub max_write_batch: usize,
    @@ -8,7 +8,7 @@
     
    §max_read_duration: Duration

    Maximum duration to wait before committing a read transaction.

    §max_write_batch: usize

    Maximum number of actor messages to batch before committing write transaction.

    §max_write_duration: Duration

    Maximum duration to wait before committing a write transaction.

    -

    Trait Implementations§

    source§

    impl Clone for BatchOptions

    source§

    fn clone(&self) -> BatchOptions

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for BatchOptions

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl Default for BatchOptions

    source§

    fn default() -> BatchOptions

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for BatchOptions

    §

    fn clone(&self) -> BatchOptions

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for BatchOptions

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for BatchOptions

    §

    fn default() -> BatchOptions

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2583/docs/iroh/blobs/store/fs/struct.FlatStorePaths.html b/pr/2583/docs/iroh/blobs/store/fs/struct.FlatStorePaths.html index b6e5401f94..d387763e4e 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/struct.FlatStorePaths.html +++ b/pr/2583/docs/iroh/blobs/store/fs/struct.FlatStorePaths.html @@ -1,4 +1,4 @@ -FlatStorePaths in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::FlatStorePaths

    source ·
    pub struct FlatStorePaths {
    +FlatStorePaths in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::FlatStorePaths

    pub struct FlatStorePaths {
         pub complete: PathBuf,
         pub partial: PathBuf,
         pub meta: PathBuf,
    @@ -6,7 +6,7 @@
     

    Fields§

    §complete: PathBuf

    Complete data files

    §partial: PathBuf

    Partial data files

    §meta: PathBuf

    Metadata files such as the tags table

    -

    Trait Implementations§

    source§

    impl Debug for FlatStorePaths

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Debug for FlatStorePaths

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2583/docs/iroh/blobs/store/fs/struct.InlineOptions.html b/pr/2583/docs/iroh/blobs/store/fs/struct.InlineOptions.html index 8df767f66d..1cda1f2c98 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/struct.InlineOptions.html +++ b/pr/2583/docs/iroh/blobs/store/fs/struct.InlineOptions.html @@ -1,12 +1,12 @@ -InlineOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::InlineOptions

    source ·
    pub struct InlineOptions {
    +InlineOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::InlineOptions

    pub struct InlineOptions {
         pub max_data_inlined: u64,
         pub max_outboard_inlined: u64,
     }
    Expand description

    Options for inlining small complete data or outboards.

    Fields§

    §max_data_inlined: u64

    Maximum data size to inline.

    §max_outboard_inlined: u64

    Maximum outboard size to inline.

    -

    Implementations§

    source§

    impl InlineOptions

    source

    pub const NO_INLINE: InlineOptions = _

    Do not inline anything, ever.

    -
    source

    pub const ALWAYS_INLINE: InlineOptions = _

    Always inline everything

    -

    Trait Implementations§

    source§

    impl Clone for InlineOptions

    source§

    fn clone(&self) -> InlineOptions

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for InlineOptions

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl Default for InlineOptions

    source§

    fn default() -> InlineOptions

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +

    Implementations§

    §

    impl InlineOptions

    pub const NO_INLINE: InlineOptions = _

    Do not inline anything, ever.

    +

    pub const ALWAYS_INLINE: InlineOptions = _

    Always inline everything

    +

    Trait Implementations§

    §

    impl Clone for InlineOptions

    §

    fn clone(&self) -> InlineOptions

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for InlineOptions

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for InlineOptions

    §

    fn default() -> InlineOptions

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2583/docs/iroh/blobs/store/fs/struct.Options.html b/pr/2583/docs/iroh/blobs/store/fs/struct.Options.html index e12510104b..5bf6b716e0 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/struct.Options.html +++ b/pr/2583/docs/iroh/blobs/store/fs/struct.Options.html @@ -1,4 +1,4 @@ -Options in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::Options

    source ·
    pub struct Options {
    +Options in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::Options

    pub struct Options {
         pub path: PathOptions,
         pub inline: InlineOptions,
         pub batch: BatchOptions,
    @@ -6,7 +6,7 @@
     

    Fields§

    §path: PathOptions

    Path options.

    §inline: InlineOptions

    Inline storage options.

    §batch: BatchOptions

    Transaction batching options.

    -

    Trait Implementations§

    source§

    impl Clone for Options

    source§

    fn clone(&self) -> Options

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Options

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for Options

    §

    fn clone(&self) -> Options

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Options

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2583/docs/iroh/blobs/store/fs/struct.PathOptions.html b/pr/2583/docs/iroh/blobs/store/fs/struct.PathOptions.html index 4aa16aa48a..dae85e0907 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/struct.PathOptions.html +++ b/pr/2583/docs/iroh/blobs/store/fs/struct.PathOptions.html @@ -1,4 +1,4 @@ -PathOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::PathOptions

    source ·
    pub struct PathOptions {
    +PathOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::PathOptions

    pub struct PathOptions {
         pub data_path: PathBuf,
         pub temp_path: PathBuf,
     }
    Expand description

    Options for directories used by the file store.

    @@ -6,7 +6,7 @@
    §temp_path: PathBuf

    Path to the directory where temp files are stored. This must be on the same device as data_path, since we need to atomically move temp files into place.

    -

    Trait Implementations§

    source§

    impl Clone for PathOptions

    source§

    fn clone(&self) -> PathOptions

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PathOptions

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for PathOptions

    §

    fn clone(&self) -> PathOptions

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for PathOptions

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2583/docs/iroh/blobs/store/fs/struct.Store.html b/pr/2583/docs/iroh/blobs/store/fs/struct.Store.html index 8e0ac7f0a7..889d37a6bd 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/struct.Store.html +++ b/pr/2583/docs/iroh/blobs/store/fs/struct.Store.html @@ -1,87 +1,87 @@ -Store in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::Store

    source ·
    pub struct Store(/* private fields */);
    Expand description

    Storage that is using a redb database for small files and files for +Store in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::Store

    pub struct Store(/* private fields */);
    Expand description

    Storage that is using a redb database for small files and files for large files.

    -

    Implementations§

    source§

    impl Store

    source

    pub async fn transform_entries( +

    Implementations§

    §

    impl Store

    pub async fn transform_entries( &self, transform: impl Fn(Hash, EntryData) -> Option<EntryData> + Send + Sync ) -> Result<(), Error>

    Transform all entries in the store. This is for testing and can be used to get the store in a wrong state.

    -
    source

    pub fn owned_data_path(&self, hash: &Hash) -> PathBuf

    Owned data path

    -
    source

    pub fn owned_outboard_path(&self, hash: &Hash) -> PathBuf

    Owned outboard path

    -
    source§

    impl Store

    source

    pub async fn load(root: impl AsRef<Path>) -> Result<Store, Error>

    Load or create a new store.

    -
    source

    pub async fn new(path: PathBuf, options: Options) -> Result<Store, Error>

    Create a new store with custom options.

    -
    source

    pub async fn update_inline_options( +

    pub fn owned_data_path(&self, hash: &Hash) -> PathBuf

    Owned data path

    +

    pub fn owned_outboard_path(&self, hash: &Hash) -> PathBuf

    Owned outboard path

    +
    §

    impl Store

    pub async fn load(root: impl AsRef<Path>) -> Result<Store, Error>

    Load or create a new store.

    +

    pub async fn new(path: PathBuf, options: Options) -> Result<Store, Error>

    Create a new store with custom options.

    +

    pub async fn update_inline_options( &self, inline_options: InlineOptions, reapply: bool ) -> Result<(), Error>

    Update the inline options.

    When reapply is true, the new options will be applied to all existing entries.

    -
    source

    pub async fn dump(&self) -> Result<(), Error>

    Dump the entire content of the database to stdout.

    -
    source

    pub async fn sync(&self) -> Result<(), Error>

    Ensure that all operations before the sync are processed and persisted.

    +

    pub async fn dump(&self) -> Result<(), Error>

    Dump the entire content of the database to stdout.

    +

    pub async fn sync(&self) -> Result<(), Error>

    Ensure that all operations before the sync are processed and persisted.

    This is done by closing any open write transaction.

    -
    source

    pub async fn import_flat_store( +

    pub async fn import_flat_store( &self, paths: FlatStorePaths ) -> Result<bool, Error>

    Import from a v0 or v1 flat store, for backwards compatibility.

    -

    Trait Implementations§

    source§

    impl Clone for Store

    source§

    fn clone(&self) -> Store

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Store

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl Map for Store

    §

    type Entry = BaoFileHandle

    The entry type. An entry is a cheaply cloneable handle that can be used -to open readers for both the data and the outboard
    source§

    async fn get(&self, hash: &Hash) -> Result<Option<<Store as Map>::Entry>, Error>

    Get an entry for a hash. Read more
    source§

    impl MapMut for Store

    §

    type EntryMut = BaoFileHandle

    An entry that is possibly writable
    source§

    async fn get_or_create( +

    Trait Implementations§

    §

    impl Clone for Store

    §

    fn clone(&self) -> Store

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Store

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Map for Store

    §

    type Entry = BaoFileHandle

    The entry type. An entry is a cheaply cloneable handle that can be used +to open readers for both the data and the outboard
    §

    async fn get(&self, hash: &Hash) -> Result<Option<<Store as Map>::Entry>, Error>

    Get an entry for a hash. Read more
    §

    impl MapMut for Store

    §

    type EntryMut = BaoFileHandle

    An entry that is possibly writable
    §

    async fn get_or_create( &self, hash: Hash, _size: u64 -) -> Result<<Store as MapMut>::EntryMut, Error>

    Get an existing partial entry, or create a new one. Read more
    source§

    async fn entry_status(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Find out if the data behind a hash is complete, partial, or not present. Read more
    source§

    async fn get_mut( +) -> Result<<Store as MapMut>::EntryMut, Error>

    Get an existing partial entry, or create a new one. Read more
    §

    async fn entry_status(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Find out if the data behind a hash is complete, partial, or not present. Read more
    §

    async fn get_mut( &self, hash: &Hash -) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    source§

    async fn insert_complete( +) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    §

    async fn insert_complete( &self, entry: <Store as MapMut>::EntryMut -) -> Result<(), Error>

    Upgrade a partial entry to a complete entry.
    source§

    fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Sync version of entry_status, for the doc sync engine until we can get rid of it. Read more
    source§

    impl ReadableStore for Store

    source§

    async fn blobs( +) -> Result<(), Error>

    Upgrade a partial entry to a complete entry.
    §

    fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Sync version of entry_status, for the doc sync engine until we can get rid of it. Read more
    §

    impl ReadableStore for Store

    §

    async fn blobs( &self ) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list all blobs in the database. This includes both raw blobs that have -been imported, and hash sequences that have been created internally.
    source§

    async fn partial_blobs( +been imported, and hash sequences that have been created internally.

    §

    async fn partial_blobs( &self -) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    source§

    async fn tags( +) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    §

    async fn tags( &self -) -> Result<Box<dyn Iterator<Item = Result<(Tag, HashAndFormat), Error>> + Send + Sync>, Error>

    list all tags (collections or other explicitly added things) in the database
    source§

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    source§

    async fn consistency_check( +) -> Result<Box<dyn Iterator<Item = Result<(Tag, HashAndFormat), Error>> + Send + Sync>, Error>

    list all tags (collections or other explicitly added things) in the database
    §

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    §

    async fn consistency_check( &self, repair: bool, tx: BoxedProgressSender<ConsistencyCheckProgress> -) -> Result<(), Error>

    Perform a consistency check on the database
    source§

    async fn export( +) -> Result<(), Error>

    Perform a consistency check on the database
    §

    async fn export( &self, hash: Hash, target: PathBuf, mode: ExportMode, progress: Box<dyn Fn(u64) -> Result<(), Error> + Send + Sync> -) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    source§

    impl Store for Store

    source§

    async fn import_file( +) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    §

    impl Store for Store

    §

    async fn import_file( &self, path: PathBuf, mode: ImportMode, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    source§

    async fn import_bytes( +) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    §

    async fn import_bytes( &self, data: Bytes, format: BlobFormat -) -> Result<TempTag, Error>

    Import data from memory. Read more
    source§

    async fn import_stream( +) -> Result<TempTag, Error>

    Import data from memory. Read more
    §

    async fn import_stream( &self, data: impl Stream<Item = Result<Bytes, Error>> + Unpin + Send + 'static, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    source§

    async fn set_tag( +) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    §

    async fn set_tag( &self, name: Tag, hash: Option<HashAndFormat> -) -> Result<(), Error>

    Set a tag
    source§

    async fn create_tag(&self, hash: HashAndFormat) -> Result<Tag, Error>

    Create a new tag
    source§

    async fn delete(&self, hashes: Vec<Hash>) -> Result<(), Error>

    physically delete the given hashes from the store.
    source§

    async fn gc_start(&self) -> Result<(), Error>

    Notify the store that a new gc phase is about to start. Read more
    source§

    fn temp_tag(&self, value: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    source§

    async fn shutdown(&self)

    Shutdown the store.
    source§

    fn import_reader( +) -> Result<(), Error>

    Set a tag
    §

    async fn create_tag(&self, hash: HashAndFormat) -> Result<Tag, Error>

    Create a new tag
    §

    async fn delete(&self, hashes: Vec<Hash>) -> Result<(), Error>

    physically delete the given hashes from the store.
    §

    async fn gc_start(&self) -> Result<(), Error>

    Notify the store that a new gc phase is about to start. Read more
    §

    fn temp_tag(&self, value: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    §

    async fn shutdown(&self)

    Shutdown the store.
    §

    fn import_reader( &self, data: impl AsyncRead + Send + Unpin + 'static, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    source§

    fn gc_mark( +) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    §

    fn gc_mark( &self, live: &mut BTreeSet<Hash> -) -> impl Stream<Item = GcMarkEvent> + Unpin

    Traverse all roots recursively and mark them as live. Read more
    source§

    fn gc_sweep( +) -> impl Stream<Item = GcMarkEvent> + Unpin

    Traverse all roots recursively and mark them as live. Read more
    §

    fn gc_sweep( &self, live: &BTreeSet<Hash> -) -> impl Stream<Item = GcSweepEvent> + Unpin

    Remove all blobs that are not marked as live. Read more
    source§

    fn validate( +) -> impl Stream<Item = GcSweepEvent> + Unpin

    Remove all blobs that are not marked as live. Read more
    §

    fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> diff --git a/pr/2583/docs/iroh/blobs/store/fs/type.Entry.html b/pr/2583/docs/iroh/blobs/store/fs/type.Entry.html index 192637bb60..002d29dd86 100644 --- a/pr/2583/docs/iroh/blobs/store/fs/type.Entry.html +++ b/pr/2583/docs/iroh/blobs/store/fs/type.Entry.html @@ -1,2 +1,2 @@ -Entry in iroh::blobs::store::fs - Rust

    Type Alias iroh::blobs::store::fs::Entry

    source ·
    pub type Entry = BaoFileHandle;
    Expand description

    Use BaoFileHandle as the entry type for the map.

    +Entry in iroh::blobs::store::fs - Rust

    Type Alias iroh::blobs::store::fs::Entry

    pub type Entry = BaoFileHandle;
    Expand description

    Use BaoFileHandle as the entry type for the map.

    Aliased Type§

    struct Entry(/* private fields */);
    \ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/index.html b/pr/2583/docs/iroh/blobs/store/index.html index 02b5f95b3a..6fa2ca7672 100644 --- a/pr/2583/docs/iroh/blobs/store/index.html +++ b/pr/2583/docs/iroh/blobs/store/index.html @@ -1,3 +1,3 @@ -iroh::blobs::store - Rust

    Module iroh::blobs::store

    source ·
    Expand description

    Implementations of blob stores

    +iroh::blobs::store - Rust

    Module iroh::blobs::store

    Expand description

    Implementations of blob stores

    Modules§

    • Efficient BLAKE3 based verified streaming
    • redb backed storage
    • A full in memory database for iroh-blobs
    • A set of non-overlapping ranges, backed by SmallVec<T>
    • A readonly in memory database for iroh-blobs, usable for testing and sharing static data.

    Enums§

    Traits§

    • An async batch interface for writing bao content items to a pair of data and outboard.
    • A generic map from hashes to bao blobs (blobs with bao outboards).
    • An entry for one hash in a bao map
    • A partial entry
    • A mutable bao map.
    • Extension of Map to add misc methods used by the rpc calls.
    • The mutable part of a Bao store.

    Type Aliases§

    \ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/mem/index.html b/pr/2583/docs/iroh/blobs/store/mem/index.html index c9df53dd11..4888f5351d 100644 --- a/pr/2583/docs/iroh/blobs/store/mem/index.html +++ b/pr/2583/docs/iroh/blobs/store/mem/index.html @@ -1,4 +1,4 @@ -iroh::blobs::store::mem - Rust

    Module iroh::blobs::store::mem

    source ·
    Expand description

    A full in memory database for iroh-blobs

    +iroh::blobs::store::mem - Rust

    Module iroh::blobs::store::mem

    Expand description

    A full in memory database for iroh-blobs

    Main entry point is Store.

    Structs§

    • An in memory entry
    • A fully featured in memory database for iroh-blobs, including support for partial blobs.
    \ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/mem/struct.Entry.html b/pr/2583/docs/iroh/blobs/store/mem/struct.Entry.html index a8e995ab35..a04f76f3e7 100644 --- a/pr/2583/docs/iroh/blobs/store/mem/struct.Entry.html +++ b/pr/2583/docs/iroh/blobs/store/mem/struct.Entry.html @@ -1,5 +1,5 @@ -Entry in iroh::blobs::store::mem - Rust

    Struct iroh::blobs::store::mem::Entry

    source ·
    pub struct Entry { /* private fields */ }
    Expand description

    An in memory entry

    -

    Trait Implementations§

    source§

    impl Clone for Entry

    source§

    fn clone(&self) -> Entry

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Entry

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl MapEntry for Entry

    source§

    fn hash(&self) -> Hash

    The hash of the entry.
    source§

    fn size(&self) -> BaoBlobSize

    The size of the entry.
    source§

    fn is_complete(&self) -> bool

    Returns true if the entry is complete. Read more
    source§

    async fn outboard(&self) -> Result<impl Outboard, Error>

    A future that resolves to a reader that can be used to read the outboard
    source§

    async fn data_reader(&self) -> Result<impl AsyncSliceReader, Error>

    A future that resolves to a reader that can be used to read the data
    source§

    impl MapEntryMut for Entry

    source§

    async fn batch_writer(&self) -> Result<impl BaoBatchWriter, Error>

    Get a batch writer

    Auto Trait Implementations§

    §

    impl Freeze for Entry

    §

    impl RefUnwindSafe for Entry

    §

    impl Send for Entry

    §

    impl Sync for Entry

    §

    impl Unpin for Entry

    §

    impl UnwindSafe for Entry

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +Entry in iroh::blobs::store::mem - Rust

    Struct iroh::blobs::store::mem::Entry

    pub struct Entry { /* private fields */ }
    Expand description

    An in memory entry

    +

    Trait Implementations§

    §

    impl Clone for Entry

    §

    fn clone(&self) -> Entry

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Entry

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl MapEntry for Entry

    §

    fn hash(&self) -> Hash

    The hash of the entry.
    §

    fn size(&self) -> BaoBlobSize

    The size of the entry.
    §

    fn is_complete(&self) -> bool

    Returns true if the entry is complete. Read more
    §

    async fn outboard(&self) -> Result<impl Outboard, Error>

    A future that resolves to a reader that can be used to read the outboard
    §

    async fn data_reader(&self) -> Result<impl AsyncSliceReader, Error>

    A future that resolves to a reader that can be used to read the data
    §

    impl MapEntryMut for Entry

    §

    async fn batch_writer(&self) -> Result<impl BaoBatchWriter, Error>

    Get a batch writer

    Auto Trait Implementations§

    §

    impl Freeze for Entry

    §

    impl RefUnwindSafe for Entry

    §

    impl Send for Entry

    §

    impl Sync for Entry

    §

    impl Unpin for Entry

    §

    impl UnwindSafe for Entry

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2583/docs/iroh/blobs/store/mem/struct.Store.html b/pr/2583/docs/iroh/blobs/store/mem/struct.Store.html index 3634fcc4cd..620fc9281d 100644 --- a/pr/2583/docs/iroh/blobs/store/mem/struct.Store.html +++ b/pr/2583/docs/iroh/blobs/store/mem/struct.Store.html @@ -1,58 +1,58 @@ -Store in iroh::blobs::store::mem - Rust

    Struct iroh::blobs::store::mem::Store

    source ·
    pub struct Store { /* private fields */ }
    Expand description

    A fully featured in memory database for iroh-blobs, including support for +Store in iroh::blobs::store::mem - Rust

    Struct iroh::blobs::store::mem::Store

    pub struct Store { /* private fields */ }
    Expand description

    A fully featured in memory database for iroh-blobs, including support for partial blobs.

    -

    Implementations§

    source§

    impl Store

    source

    pub fn new() -> Store

    Create a new in memory store

    -

    Trait Implementations§

    source§

    impl Clone for Store

    source§

    fn clone(&self) -> Store

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Store

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl Default for Store

    source§

    fn default() -> Store

    Returns the “default value” for a type. Read more
    source§

    impl Map for Store

    §

    type Entry = Entry

    The entry type. An entry is a cheaply cloneable handle that can be used -to open readers for both the data and the outboard
    source§

    async fn get(&self, hash: &Hash) -> Result<Option<<Store as Map>::Entry>, Error>

    Get an entry for a hash. Read more
    source§

    impl MapMut for Store

    §

    type EntryMut = Entry

    An entry that is possibly writable
    source§

    async fn get_mut( +

    Implementations§

    §

    impl Store

    pub fn new() -> Store

    Create a new in memory store

    +

    Trait Implementations§

    §

    impl Clone for Store

    §

    fn clone(&self) -> Store

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Store

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Store

    §

    fn default() -> Store

    Returns the “default value” for a type. Read more
    §

    impl Map for Store

    §

    type Entry = Entry

    The entry type. An entry is a cheaply cloneable handle that can be used +to open readers for both the data and the outboard
    §

    async fn get(&self, hash: &Hash) -> Result<Option<<Store as Map>::Entry>, Error>

    Get an entry for a hash. Read more
    §

    impl MapMut for Store

    §

    type EntryMut = Entry

    An entry that is possibly writable
    §

    async fn get_mut( &self, hash: &Hash -) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    source§

    async fn get_or_create(&self, hash: Hash, _size: u64) -> Result<Entry, Error>

    Get an existing partial entry, or create a new one. Read more
    source§

    async fn entry_status(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Find out if the data behind a hash is complete, partial, or not present. Read more
    source§

    fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Sync version of entry_status, for the doc sync engine until we can get rid of it. Read more
    source§

    async fn insert_complete(&self, entry: Entry) -> Result<(), Error>

    Upgrade a partial entry to a complete entry.
    source§

    impl ReadableStore for Store

    source§

    async fn blobs( +) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    §

    async fn get_or_create(&self, hash: Hash, _size: u64) -> Result<Entry, Error>

    Get an existing partial entry, or create a new one. Read more
    §

    async fn entry_status(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Find out if the data behind a hash is complete, partial, or not present. Read more
    §

    fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Sync version of entry_status, for the doc sync engine until we can get rid of it. Read more
    §

    async fn insert_complete(&self, entry: Entry) -> Result<(), Error>

    Upgrade a partial entry to a complete entry.
    §

    impl ReadableStore for Store

    §

    async fn blobs( &self ) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list all blobs in the database. This includes both raw blobs that have -been imported, and hash sequences that have been created internally.
    source§

    async fn partial_blobs( +been imported, and hash sequences that have been created internally.

    §

    async fn partial_blobs( &self -) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    source§

    async fn tags( +) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    §

    async fn tags( &self -) -> Result<Box<dyn Iterator<Item = Result<(Tag, HashAndFormat), Error>> + Send + Sync>, Error>

    list all tags (collections or other explicitly added things) in the database
    source§

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    source§

    async fn consistency_check( +) -> Result<Box<dyn Iterator<Item = Result<(Tag, HashAndFormat), Error>> + Send + Sync>, Error>

    list all tags (collections or other explicitly added things) in the database
    §

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    §

    async fn consistency_check( &self, _repair: bool, _tx: BoxedProgressSender<ConsistencyCheckProgress> -) -> Result<(), Error>

    Perform a consistency check on the database
    source§

    async fn export( +) -> Result<(), Error>

    Perform a consistency check on the database
    §

    async fn export( &self, hash: Hash, target: PathBuf, mode: ExportMode, progress: Box<dyn Fn(u64) -> Result<(), Error> + Send + Sync> -) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    source§

    impl Store for Store

    source§

    async fn import_file( +) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    §

    impl Store for Store

    §

    async fn import_file( &self, path: PathBuf, _mode: ImportMode, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    source§

    async fn import_stream( +) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    §

    async fn import_stream( &self, data: impl Stream<Item = Result<Bytes, Error>> + Unpin + Send + 'static, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    source§

    async fn import_bytes( +) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    §

    async fn import_bytes( &self, bytes: Bytes, format: BlobFormat -) -> Result<TempTag, Error>

    Import data from memory. Read more
    source§

    async fn set_tag( +) -> Result<TempTag, Error>

    Import data from memory. Read more
    §

    async fn set_tag( &self, name: Tag, value: Option<HashAndFormat> -) -> Result<(), Error>

    Set a tag
    source§

    async fn create_tag(&self, hash: HashAndFormat) -> Result<Tag, Error>

    Create a new tag
    source§

    fn temp_tag(&self, tag: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    source§

    async fn gc_start(&self) -> Result<(), Error>

    Notify the store that a new gc phase is about to start. Read more
    source§

    async fn delete(&self, hashes: Vec<Hash>) -> Result<(), Error>

    physically delete the given hashes from the store.
    source§

    async fn shutdown(&self)

    Shutdown the store.
    source§

    fn import_reader( +) -> Result<(), Error>

    Set a tag
    §

    async fn create_tag(&self, hash: HashAndFormat) -> Result<Tag, Error>

    Create a new tag
    §

    fn temp_tag(&self, tag: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    §

    async fn gc_start(&self) -> Result<(), Error>

    Notify the store that a new gc phase is about to start. Read more
    §

    async fn delete(&self, hashes: Vec<Hash>) -> Result<(), Error>

    physically delete the given hashes from the store.
    §

    async fn shutdown(&self)

    Shutdown the store.
    §

    fn import_reader( &self, data: impl AsyncRead + Send + Unpin + 'static, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    source§

    fn gc_mark( +) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    §

    fn gc_mark( &self, live: &mut BTreeSet<Hash> -) -> impl Stream<Item = GcMarkEvent> + Unpin

    Traverse all roots recursively and mark them as live. Read more
    source§

    fn gc_sweep( +) -> impl Stream<Item = GcMarkEvent> + Unpin

    Traverse all roots recursively and mark them as live. Read more
    §

    fn gc_sweep( &self, live: &BTreeSet<Hash> -) -> impl Stream<Item = GcSweepEvent> + Unpin

    Remove all blobs that are not marked as live. Read more
    source§

    fn validate( +) -> impl Stream<Item = GcSweepEvent> + Unpin

    Remove all blobs that are not marked as live. Read more
    §

    fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> diff --git a/pr/2583/docs/iroh/blobs/store/readonly_mem/index.html b/pr/2583/docs/iroh/blobs/store/readonly_mem/index.html index 05f768b8ab..287a99c51a 100644 --- a/pr/2583/docs/iroh/blobs/store/readonly_mem/index.html +++ b/pr/2583/docs/iroh/blobs/store/readonly_mem/index.html @@ -1,3 +1,3 @@ -iroh::blobs::store::readonly_mem - Rust

    Module iroh::blobs::store::readonly_mem

    source ·
    Expand description

    A readonly in memory database for iroh-blobs, usable for testing and sharing static data.

    +iroh::blobs::store::readonly_mem - Rust

    Module iroh::blobs::store::readonly_mem

    Expand description

    A readonly in memory database for iroh-blobs, usable for testing and sharing static data.

    Main entry point is Store.

    Structs§

    \ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Entry.html b/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Entry.html index c8eebb2d0a..ce0141a26e 100644 --- a/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Entry.html +++ b/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Entry.html @@ -1,5 +1,5 @@ -Entry in iroh::blobs::store::readonly_mem - Rust

    Struct iroh::blobs::store::readonly_mem::Entry

    source ·
    pub struct Entry { /* private fields */ }
    Expand description

    The MapEntry implementation for Store.

    -

    Trait Implementations§

    source§

    impl Clone for Entry

    source§

    fn clone(&self) -> Entry

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Entry

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl MapEntry for Entry

    source§

    fn hash(&self) -> Hash

    The hash of the entry.
    source§

    fn size(&self) -> BaoBlobSize

    The size of the entry.
    source§

    async fn outboard(&self) -> Result<impl Outboard, Error>

    A future that resolves to a reader that can be used to read the outboard
    source§

    async fn data_reader(&self) -> Result<impl AsyncSliceReader, Error>

    A future that resolves to a reader that can be used to read the data
    source§

    fn is_complete(&self) -> bool

    Returns true if the entry is complete. Read more
    source§

    impl MapEntryMut for Entry

    source§

    async fn batch_writer(&self) -> Result<impl BaoBatchWriter, Error>

    Get a batch writer

    Auto Trait Implementations§

    §

    impl !Freeze for Entry

    §

    impl RefUnwindSafe for Entry

    §

    impl Send for Entry

    §

    impl Sync for Entry

    §

    impl Unpin for Entry

    §

    impl UnwindSafe for Entry

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +Entry in iroh::blobs::store::readonly_mem - Rust

    Struct iroh::blobs::store::readonly_mem::Entry

    pub struct Entry { /* private fields */ }
    Expand description

    The MapEntry implementation for Store.

    +

    Trait Implementations§

    §

    impl Clone for Entry

    §

    fn clone(&self) -> Entry

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Entry

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl MapEntry for Entry

    §

    fn hash(&self) -> Hash

    The hash of the entry.
    §

    fn size(&self) -> BaoBlobSize

    The size of the entry.
    §

    async fn outboard(&self) -> Result<impl Outboard, Error>

    A future that resolves to a reader that can be used to read the outboard
    §

    async fn data_reader(&self) -> Result<impl AsyncSliceReader, Error>

    A future that resolves to a reader that can be used to read the data
    §

    fn is_complete(&self) -> bool

    Returns true if the entry is complete. Read more
    §

    impl MapEntryMut for Entry

    §

    async fn batch_writer(&self) -> Result<impl BaoBatchWriter, Error>

    Get a batch writer

    Auto Trait Implementations§

    §

    impl !Freeze for Entry

    §

    impl RefUnwindSafe for Entry

    §

    impl Send for Entry

    §

    impl Sync for Entry

    §

    impl Unpin for Entry

    §

    impl UnwindSafe for Entry

    Blanket Implementations§

    source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Store.html b/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Store.html index 72bd9396d7..154481283a 100644 --- a/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Store.html +++ b/pr/2583/docs/iroh/blobs/store/readonly_mem/struct.Store.html @@ -1,75 +1,75 @@ -Store in iroh::blobs::store::readonly_mem - Rust

    Struct iroh::blobs::store::readonly_mem::Store

    source ·
    pub struct Store(/* private fields */);
    Expand description

    A readonly in memory database for iroh-blobs.

    +Store in iroh::blobs::store::readonly_mem - Rust

    Struct iroh::blobs::store::readonly_mem::Store

    pub struct Store(/* private fields */);
    Expand description

    A readonly in memory database for iroh-blobs.

    This is basically just a HashMap, so it does not allow for any modifications unless you have a mutable reference to it.

    It is therefore useful mostly for testing and sharing static data.

    -

    Implementations§

    source§

    impl Store

    source

    pub fn new( +

    Implementations§

    §

    impl Store

    pub fn new( entries: impl IntoIterator<Item = (impl Into<String>, impl AsRef<[u8]>)> ) -> (Store, BTreeMap<String, Hash>)

    Create a new Store from a sequence of entries.

    Returns the database and a map of names to computed blake3 hashes. In case of duplicate names, the last entry is used.

    -
    source

    pub fn insert(&mut self, data: impl AsRef<[u8]>) -> Hash

    Insert a new entry into the database, and return the hash of the entry.

    +

    pub fn insert(&mut self, data: impl AsRef<[u8]>) -> Hash

    Insert a new entry into the database, and return the hash of the entry.

    If the database was shared before, this will make a copy.

    -
    source

    pub fn insert_many( +

    pub fn insert_many( &mut self, items: impl IntoIterator<Item = impl AsRef<[u8]>> ) -> Option<Hash>

    Insert multiple entries into the database, and return the hash of the last entry.

    -
    source

    pub fn get_content(&self, hash: &Hash) -> Option<Bytes>

    Get the bytes associated with a hash, if they exist.

    -

    Trait Implementations§

    source§

    impl Clone for Store

    source§

    fn clone(&self) -> Store

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Store

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl Default for Store

    source§

    fn default() -> Store

    Returns the “default value” for a type. Read more
    source§

    impl<K, V> FromIterator<(K, V)> for Store
    where +

    pub fn get_content(&self, hash: &Hash) -> Option<Bytes>

    Get the bytes associated with a hash, if they exist.

    +

    Trait Implementations§

    §

    impl Clone for Store

    §

    fn clone(&self) -> Store

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Store

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Store

    §

    fn default() -> Store

    Returns the “default value” for a type. Read more
    §

    impl<K, V> FromIterator<(K, V)> for Store
    where K: Into<String>, - V: AsRef<[u8]>,

    source§

    fn from_iter<T>(iter: T) -> Store
    where - T: IntoIterator<Item = (K, V)>,

    Creates a value from an iterator. Read more
    source§

    impl Map for Store

    §

    type Entry = Entry

    The entry type. An entry is a cheaply cloneable handle that can be used -to open readers for both the data and the outboard
    source§

    async fn get(&self, hash: &Hash) -> Result<Option<<Store as Map>::Entry>, Error>

    Get an entry for a hash. Read more
    source§

    impl MapMut for Store

    §

    type EntryMut = Entry

    An entry that is possibly writable
    source§

    async fn get_mut( + V: AsRef<[u8]>,

    §

    fn from_iter<T>(iter: T) -> Store
    where + T: IntoIterator<Item = (K, V)>,

    Creates a value from an iterator. Read more
    §

    impl Map for Store

    §

    type Entry = Entry

    The entry type. An entry is a cheaply cloneable handle that can be used +to open readers for both the data and the outboard
    §

    async fn get(&self, hash: &Hash) -> Result<Option<<Store as Map>::Entry>, Error>

    Get an entry for a hash. Read more
    §

    impl MapMut for Store

    §

    type EntryMut = Entry

    An entry that is possibly writable
    §

    async fn get_mut( &self, hash: &Hash -) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    source§

    async fn get_or_create(&self, _hash: Hash, _size: u64) -> Result<Entry, Error>

    Get an existing partial entry, or create a new one. Read more
    source§

    fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Sync version of entry_status, for the doc sync engine until we can get rid of it. Read more
    source§

    async fn entry_status(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Find out if the data behind a hash is complete, partial, or not present. Read more
    source§

    async fn insert_complete(&self, _entry: Entry) -> Result<(), Error>

    Upgrade a partial entry to a complete entry.
    source§

    impl ReadableStore for Store

    source§

    async fn blobs( +) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    §

    async fn get_or_create(&self, _hash: Hash, _size: u64) -> Result<Entry, Error>

    Get an existing partial entry, or create a new one. Read more
    §

    fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Sync version of entry_status, for the doc sync engine until we can get rid of it. Read more
    §

    async fn entry_status(&self, hash: &Hash) -> Result<EntryStatus, Error>

    Find out if the data behind a hash is complete, partial, or not present. Read more
    §

    async fn insert_complete(&self, _entry: Entry) -> Result<(), Error>

    Upgrade a partial entry to a complete entry.
    §

    impl ReadableStore for Store

    §

    async fn blobs( &self ) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list all blobs in the database. This includes both raw blobs that have -been imported, and hash sequences that have been created internally.
    source§

    async fn tags( +been imported, and hash sequences that have been created internally.

    §

    async fn tags( &self -) -> Result<Box<dyn Iterator<Item = Result<(Tag, HashAndFormat), Error>> + Send + Sync>, Error>

    list all tags (collections or other explicitly added things) in the database
    source§

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    source§

    async fn consistency_check( +) -> Result<Box<dyn Iterator<Item = Result<(Tag, HashAndFormat), Error>> + Send + Sync>, Error>

    list all tags (collections or other explicitly added things) in the database
    §

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    §

    async fn consistency_check( &self, _repair: bool, _tx: BoxedProgressSender<ConsistencyCheckProgress> -) -> Result<(), Error>

    Perform a consistency check on the database
    source§

    async fn export( +) -> Result<(), Error>

    Perform a consistency check on the database
    §

    async fn export( &self, hash: Hash, target: PathBuf, mode: ExportMode, progress: Box<dyn Fn(u64) -> Result<(), Error> + Send + Sync> -) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    source§

    async fn partial_blobs( +) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    §

    async fn partial_blobs( &self -) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    source§

    impl Store for Store

    source§

    async fn import_bytes( +) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    §

    impl Store for Store

    §

    async fn import_bytes( &self, bytes: Bytes, format: BlobFormat ) -> Result<TempTag, Error>

    import a byte slice

    -
    source§

    async fn import_file( +

    §

    async fn import_file( &self, data: PathBuf, mode: ImportMode, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    source§

    async fn import_stream( +) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    §

    async fn import_stream( &self, data: impl Stream<Item = Result<Bytes, Error>> + Unpin + Send, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    source§

    async fn set_tag( +) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    §

    async fn set_tag( &self, _name: Tag, _hash: Option<HashAndFormat> -) -> Result<(), Error>

    Set a tag
    source§

    async fn create_tag(&self, _hash: HashAndFormat) -> Result<Tag, Error>

    Create a new tag
    source§

    fn temp_tag(&self, inner: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    source§

    async fn gc_start(&self) -> Result<(), Error>

    Notify the store that a new gc phase is about to start. Read more
    source§

    async fn delete(&self, _hashes: Vec<Hash>) -> Result<(), Error>

    physically delete the given hashes from the store.
    source§

    async fn shutdown(&self)

    Shutdown the store.
    source§

    fn import_reader( +) -> Result<(), Error>

    Set a tag
    §

    async fn create_tag(&self, _hash: HashAndFormat) -> Result<Tag, Error>

    Create a new tag
    §

    fn temp_tag(&self, inner: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    §

    async fn gc_start(&self) -> Result<(), Error>

    Notify the store that a new gc phase is about to start. Read more
    §

    async fn delete(&self, _hashes: Vec<Hash>) -> Result<(), Error>

    physically delete the given hashes from the store.
    §

    async fn shutdown(&self)

    Shutdown the store.
    §

    fn import_reader( &self, data: impl AsyncRead + Send + Unpin + 'static, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator -) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    source§

    fn gc_mark( +) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    §

    fn gc_mark( &self, live: &mut BTreeSet<Hash> -) -> impl Stream<Item = GcMarkEvent> + Unpin

    Traverse all roots recursively and mark them as live. Read more
    source§

    fn gc_sweep( +) -> impl Stream<Item = GcMarkEvent> + Unpin

    Traverse all roots recursively and mark them as live. Read more
    §

    fn gc_sweep( &self, live: &BTreeSet<Hash> -) -> impl Stream<Item = GcSweepEvent> + Unpin

    Remove all blobs that are not marked as live. Read more
    source§

    fn validate( +) -> impl Stream<Item = GcSweepEvent> + Unpin

    Remove all blobs that are not marked as live. Read more
    §

    fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> diff --git a/pr/2583/docs/iroh/blobs/store/trait.BaoBatchWriter.html b/pr/2583/docs/iroh/blobs/store/trait.BaoBatchWriter.html index 7875f57141..cb68929d77 100644 --- a/pr/2583/docs/iroh/blobs/store/trait.BaoBatchWriter.html +++ b/pr/2583/docs/iroh/blobs/store/trait.BaoBatchWriter.html @@ -1,4 +1,4 @@ -BaoBatchWriter in iroh::blobs::store - Rust

    Trait iroh::blobs::store::BaoBatchWriter

    source ·
    pub trait BaoBatchWriter {
    +BaoBatchWriter in iroh::blobs::store - Rust

    Trait iroh::blobs::store::BaoBatchWriter

    pub trait BaoBatchWriter {
         // Required methods
         fn write_batch(
             &mut self,
    @@ -10,7 +10,7 @@
     outboard.

    Details like the chunk group size and the actual storage location are left to the implementation.

    -

    Required Methods§

    Required Methods§

    fn write_batch( &mut self, size: u64, batch: Vec<BaoContentItem> @@ -29,13 +29,13 @@ parent nodes and a leaf.

    Batch is a vec so it can be moved into a task, which is unfortunately necessary in typical io code.

    -

    source

    fn sync(&mut self) -> impl Future<Output = Result<(), Error>>

    Sync the written data to permanent storage, if applicable. +

    fn sync(&mut self) -> impl Future<Output = Result<(), Error>>

    Sync the written data to permanent storage, if applicable. E.g. for a file based implementation, this would call sync_data on all files.

    -

    Object Safety§

    This trait is not object safe.

    Implementations on Foreign Types§

    source§

    impl<W> BaoBatchWriter for &mut W
    where +

    Object Safety§

    This trait is not object safe.

    Implementations on Foreign Types§

    §

    impl<W> BaoBatchWriter for &mut W
    where W: BaoBatchWriter,

    Implement BaoBatchWriter for mutable references

    -
    §

    async fn write_batch( &mut self, size: u64, batch: Vec<BaoContentItem> -) -> Result<(), Error>

    source§

    async fn sync(&mut self) -> Result<(), Error>

    Implementors§

    \ No newline at end of file +) -> Result<(), Error>

    §

    async fn sync(&mut self) -> Result<(), Error>

    Implementors§

    \ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/trait.Map.html b/pr/2583/docs/iroh/blobs/store/trait.Map.html index 06eb16157c..f4538ed7f8 100644 --- a/pr/2583/docs/iroh/blobs/store/trait.Map.html +++ b/pr/2583/docs/iroh/blobs/store/trait.Map.html @@ -1,4 +1,4 @@ -Map in iroh::blobs::store - Rust

    Trait iroh::blobs::store::Map

    source ·
    pub trait Map: Clone + Send + Sync + 'static {
    +Map in iroh::blobs::store - Rust

    Trait iroh::blobs::store::Map

    pub trait Map: Clone + Send + Sync + 'static {
         type Entry: MapEntry;
     
         // Required method
    @@ -12,9 +12,9 @@
     

    Entries are not guaranteed to be complete for all implementations. They are also not guaranteed to be immutable, since this could be the readonly view of a mutable store.

    -

    Required Associated Types§

    source

    type Entry: MapEntry

    The entry type. An entry is a cheaply cloneable handle that can be used +

    Required Associated Types§

    type Entry: MapEntry

    The entry type. An entry is a cheaply cloneable handle that can be used to open readers for both the data and the outboard

    -

    Required Methods§

    source

    fn get( +

    Required Methods§

    fn get( &self, hash: &Hash ) -> impl Future<Output = Result<Option<Self::Entry>, Error>> + Send

    Get an entry for a hash.

    @@ -22,4 +22,4 @@ is an entry. Creating an entry should be cheap, any expensive ops should be deferred to the creation of the actual readers.

    It is not guaranteed that the entry is complete.

    -

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl Map for iroh::blobs::store::fs::Store

    §

    type Entry = BaoFileHandle

    source§

    impl Map for iroh::blobs::store::mem::Store

    §

    type Entry = Entry

    source§

    impl Map for iroh::blobs::store::readonly_mem::Store

    §

    type Entry = Entry

    \ No newline at end of file +

    Object Safety§

    This trait is not object safe.

    Implementors§

    §

    impl Map for iroh::blobs::store::fs::Store

    §

    type Entry = BaoFileHandle

    §

    impl Map for iroh::blobs::store::mem::Store

    §

    type Entry = Entry

    §

    impl Map for iroh::blobs::store::readonly_mem::Store

    §

    type Entry = Entry

    \ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/trait.MapEntry.html b/pr/2583/docs/iroh/blobs/store/trait.MapEntry.html index cd9aa4d5e1..53e29ab248 100644 --- a/pr/2583/docs/iroh/blobs/store/trait.MapEntry.html +++ b/pr/2583/docs/iroh/blobs/store/trait.MapEntry.html @@ -1,4 +1,4 @@ -MapEntry in iroh::blobs::store - Rust

    Trait iroh::blobs::store::MapEntry

    source ·
    pub trait MapEntry: Debug + Clone + Send + Sync + 'static {
    +MapEntry in iroh::blobs::store - Rust

    Trait iroh::blobs::store::MapEntry

    pub trait MapEntry: Debug + Clone + Send + Sync + 'static {
         // Required methods
         fn hash(&self) -> Hash;
         fn size(&self) -> BaoBlobSize;
    @@ -14,13 +14,13 @@
     reader pair. Creating the reader is async and may fail. The futures that
     create the readers must be Send, but the readers themselves don’t have to
     be.

    -

    Required Methods§

    source

    fn hash(&self) -> Hash

    The hash of the entry.

    -
    source

    fn size(&self) -> BaoBlobSize

    The size of the entry.

    -
    source

    fn is_complete(&self) -> bool

    Returns true if the entry is complete.

    +

    Required Methods§

    fn hash(&self) -> Hash

    The hash of the entry.

    +

    fn size(&self) -> BaoBlobSize

    The size of the entry.

    +

    fn is_complete(&self) -> bool

    Returns true if the entry is complete.

    Note that this does not actually verify if the bytes on disk are complete, it only checks if the entry was marked as complete in the store.

    -
    source

    fn outboard(&self) -> impl Future<Output = Result<impl Outboard, Error>> + Send

    A future that resolves to a reader that can be used to read the outboard

    -
    source

    fn data_reader( +

    fn outboard(&self) -> impl Future<Output = Result<impl Outboard, Error>> + Send

    A future that resolves to a reader that can be used to read the outboard

    +

    fn data_reader( &self ) -> impl Future<Output = Result<impl AsyncSliceReader, Error>> + Send

    A future that resolves to a reader that can be used to read the data

    -

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl MapEntry for iroh::blobs::store::mem::Entry

    source§

    impl MapEntry for iroh::blobs::store::readonly_mem::Entry

    \ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

§

impl MapEntry for iroh::blobs::store::mem::Entry

§

impl MapEntry for iroh::blobs::store::readonly_mem::Entry

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/trait.MapEntryMut.html b/pr/2583/docs/iroh/blobs/store/trait.MapEntryMut.html index 8c54a6516a..fe7bd80da1 100644 --- a/pr/2583/docs/iroh/blobs/store/trait.MapEntryMut.html +++ b/pr/2583/docs/iroh/blobs/store/trait.MapEntryMut.html @@ -1,10 +1,10 @@ -MapEntryMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapEntryMut

source ·
pub trait MapEntryMut: MapEntry {
+MapEntryMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapEntryMut

pub trait MapEntryMut: MapEntry {
     // Required method
     fn batch_writer(
         &self
     ) -> impl Future<Output = Result<impl BaoBatchWriter, Error>> + Send;
 }
Expand description

A partial entry

-

Required Methods§

Required Methods§

fn batch_writer( &self ) -> impl Future<Output = Result<impl BaoBatchWriter, Error>> + Send

Get a batch writer

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl MapEntryMut for iroh::blobs::store::mem::Entry

source§

impl MapEntryMut for iroh::blobs::store::readonly_mem::Entry

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

§

impl MapEntryMut for iroh::blobs::store::mem::Entry

§

impl MapEntryMut for iroh::blobs::store::readonly_mem::Entry

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/trait.MapMut.html b/pr/2583/docs/iroh/blobs/store/trait.MapMut.html index 2f8c60454c..301a4b740a 100644 --- a/pr/2583/docs/iroh/blobs/store/trait.MapMut.html +++ b/pr/2583/docs/iroh/blobs/store/trait.MapMut.html @@ -1,4 +1,4 @@ -MapMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapMut

source ·
pub trait MapMut: Map {
+MapMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapMut

pub trait MapMut: Map {
     type EntryMut: MapEntryMut;
 
     // Required methods
@@ -22,30 +22,30 @@
     ) -> impl Future<Output = Result<(), Error>> + Send;
 }
Expand description

A mutable bao map.

This extends the readonly Map trait with methods to create and modify entries.

-

Required Associated Types§

source

type EntryMut: MapEntryMut

An entry that is possibly writable

-

Required Methods§

Required Associated Types§

type EntryMut: MapEntryMut

An entry that is possibly writable

+

Required Methods§

fn get_mut( &self, hash: &Hash ) -> impl Future<Output = Result<Option<Self::EntryMut>, Error>> + Send

Get an existing entry as an EntryMut.

For implementations where EntryMut and Entry are the same type, this is just an alias for get.

-
source

fn get_or_create( +

fn get_or_create( &self, hash: Hash, size: u64 ) -> impl Future<Output = Result<Self::EntryMut, Error>> + Send

Get an existing partial entry, or create a new one.

We need to know the size of the partial entry. This might produce an error e.g. if there is not enough space on disk.

-
source

fn entry_status( +

fn entry_status( &self, hash: &Hash ) -> impl Future<Output = Result<EntryStatus, Error>> + Send

Find out if the data behind a hash is complete, partial, or not present.

Note that this does not actually verify the on-disc data, but only checks in which section of the store the entry is present.

-
source

fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

Sync version of entry_status, for the doc sync engine until we can get rid of it.

+

fn entry_status_sync(&self, hash: &Hash) -> Result<EntryStatus, Error>

Sync version of entry_status, for the doc sync engine until we can get rid of it.

Don’t count on this to be efficient.

-
source

fn insert_complete( +

fn insert_complete( &self, entry: Self::EntryMut ) -> impl Future<Output = Result<(), Error>> + Send

Upgrade a partial entry to a complete entry.

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl MapMut for iroh::blobs::store::fs::Store

§

type EntryMut = BaoFileHandle

source§

impl MapMut for iroh::blobs::store::mem::Store

source§

impl MapMut for iroh::blobs::store::readonly_mem::Store

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

§

impl MapMut for iroh::blobs::store::fs::Store

§

type EntryMut = BaoFileHandle

§

impl MapMut for iroh::blobs::store::mem::Store

§

impl MapMut for iroh::blobs::store::readonly_mem::Store

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/trait.ReadableStore.html b/pr/2583/docs/iroh/blobs/store/trait.ReadableStore.html index 053d12b5bb..7bcbcf2429 100644 --- a/pr/2583/docs/iroh/blobs/store/trait.ReadableStore.html +++ b/pr/2583/docs/iroh/blobs/store/trait.ReadableStore.html @@ -1,4 +1,4 @@ -ReadableStore in iroh::blobs::store - Rust

Trait iroh::blobs::store::ReadableStore

source ·
pub trait ReadableStore: Map {
+ReadableStore in iroh::blobs::store - Rust

Trait iroh::blobs::store::ReadableStore

pub trait ReadableStore: Map {
     // Required methods
     fn blobs(
         &self
@@ -23,23 +23,23 @@
         progress: Box<dyn Fn(u64) -> Result<(), Error> + Send + Sync>
     ) -> impl Future<Output = Result<(), Error>> + Send;
 }
Expand description

Extension of Map to add misc methods used by the rpc calls.

-

Required Methods§

Required Methods§

fn blobs( &self ) -> impl Future<Output = Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>> + Send

list all blobs in the database. This includes both raw blobs that have been imported, and hash sequences that have been created internally.

-
source

fn tags( +

fn tags( &self ) -> impl Future<Output = Result<Box<dyn Iterator<Item = Result<(Tag, HashAndFormat), Error>> + Send + Sync>, Error>> + Send

list all tags (collections or other explicitly added things) in the database

-
source

fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

Temp tags

-
source

fn consistency_check( +

fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

Temp tags

+

fn consistency_check( &self, repair: bool, tx: BoxedProgressSender<ConsistencyCheckProgress> ) -> impl Future<Output = Result<(), Error>> + Send

Perform a consistency check on the database

-
source

fn partial_blobs( +

fn partial_blobs( &self ) -> impl Future<Output = Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>> + Send

list partial blobs in the database

-
source

fn export( +

fn export( &self, hash: Hash, target: PathBuf, @@ -50,4 +50,4 @@ target is the path to the target file mode is a hint how the file should be exported. progress is a callback that is called with the total number of bytes that have been written

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ReadableStore for iroh::blobs::store::fs::Store

source§

impl ReadableStore for iroh::blobs::store::mem::Store

source§

impl ReadableStore for iroh::blobs::store::readonly_mem::Store

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

§

impl ReadableStore for iroh::blobs::store::fs::Store

§

impl ReadableStore for iroh::blobs::store::mem::Store

§

impl ReadableStore for iroh::blobs::store::readonly_mem::Store

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/trait.Store.html b/pr/2583/docs/iroh/blobs/store/trait.Store.html index 59b988d633..156e45f408 100644 --- a/pr/2583/docs/iroh/blobs/store/trait.Store.html +++ b/pr/2583/docs/iroh/blobs/store/trait.Store.html @@ -1,4 +1,4 @@ -Store in iroh::blobs::store - Rust

Trait iroh::blobs::store::Store

source ·
pub trait Store: ReadableStore + MapMut + Debug {
+Store in iroh::blobs::store - Rust

Trait iroh::blobs::store::Store

pub trait Store: ReadableStore + MapMut + Debug {
 
Show 13 methods // Required methods fn import_file( &self, @@ -56,7 +56,7 @@ tx: BoxedProgressSender<ValidateProgress> ) -> impl Future<Output = Result<(), Error>> + Send { ... }
}
Expand description

The mutable part of a Bao store.

-

Required Methods§

Required Methods§

fn import_file( &self, data: PathBuf, mode: ImportMode, @@ -71,43 +71,43 @@ will fail.

Returns the hash of the imported file. The reason to have this method is that some database implementations might be able to import a file without copying it.

-

source

fn import_bytes( +

fn import_bytes( &self, bytes: Bytes, format: BlobFormat ) -> impl Future<Output = Result<TempTag, Error>> + Send

Import data from memory.

It is a special case of import that does not use the file system.

-
source

fn import_stream( +

fn import_stream( &self, data: impl Stream<Item = Result<Bytes, Error>> + Send + Unpin + 'static, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator ) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

Import data from a stream of bytes.

-
source

fn set_tag( +

fn set_tag( &self, name: Tag, hash: Option<HashAndFormat> ) -> impl Future<Output = Result<(), Error>> + Send

Set a tag

-
source

fn create_tag( +

fn create_tag( &self, hash: HashAndFormat ) -> impl Future<Output = Result<Tag, Error>> + Send

Create a new tag

-
source

fn temp_tag(&self, value: HashAndFormat) -> TempTag

Create a temporary pin for this store

-
source

fn gc_start(&self) -> impl Future<Output = Result<(), Error>> + Send

Notify the store that a new gc phase is about to start.

+

fn temp_tag(&self, value: HashAndFormat) -> TempTag

Create a temporary pin for this store

+

fn gc_start(&self) -> impl Future<Output = Result<(), Error>> + Send

Notify the store that a new gc phase is about to start.

This should not fail unless the store is shut down or otherwise in a bad state. The gc task will shut itself down if this fails.

-
source

fn delete( +

fn delete( &self, hashes: Vec<Hash> ) -> impl Future<Output = Result<(), Error>> + Send

physically delete the given hashes from the store.

-
source

fn shutdown(&self) -> impl Future<Output = ()> + Send

Shutdown the store.

-

Provided Methods§

fn shutdown(&self) -> impl Future<Output = ()> + Send

Shutdown the store.

+

Provided Methods§

fn import_reader( &self, data: impl AsyncRead + Send + Unpin + 'static, format: BlobFormat, progress: impl ProgressSender<Msg = ImportProgress> + IdGenerator ) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

Import data from an async byte reader.

-
source

fn gc_mark( +

fn gc_mark( &self, live: &mut BTreeSet<Hash> ) -> impl Stream<Item = GcMarkEvent> + Unpin

Traverse all roots recursively and mark them as live.

@@ -117,14 +117,14 @@

The implementation of this method should do the minimum amount of work to determine the live set. Actual deletion of garbage should be done in the gc_sweep phase.

-
source

fn gc_sweep( +

fn gc_sweep( &self, live: &BTreeSet<Hash> ) -> impl Stream<Item = GcSweepEvent> + Unpin

Remove all blobs that are not marked as live.

Poll this stream to completion to perform a full gc sweep. Not polling this stream to completion just means that some garbage will remain in the database.

Sweeping might take long, but it can safely be done in the background.

-
source

fn validate( +

fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> @@ -132,4 +132,4 @@

This will check that the file and outboard content is correct for all complete entries, and output valid ranges for all partial entries.

It will not check the internal consistency of the database.

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Store for iroh::blobs::store::fs::Store

source§

impl Store for iroh::blobs::store::mem::Store

source§

impl Store for iroh::blobs::store::readonly_mem::Store

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

§

impl Store for iroh::blobs::store::fs::Store

§

impl Store for iroh::blobs::store::mem::Store

§

impl Store for iroh::blobs::store::readonly_mem::Store

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/type.DbIter.html b/pr/2583/docs/iroh/blobs/store/type.DbIter.html index 7443442d3f..eef343dd41 100644 --- a/pr/2583/docs/iroh/blobs/store/type.DbIter.html +++ b/pr/2583/docs/iroh/blobs/store/type.DbIter.html @@ -1,2 +1,2 @@ -DbIter in iroh::blobs::store - Rust

Type Alias iroh::blobs::store::DbIter

source ·
pub type DbIter<T> = Box<dyn Iterator<Item = Result<T, Error>> + Send + Sync>;
Expand description

A fallible but owned iterator over the entries in a store.

+DbIter in iroh::blobs::store - Rust

Type Alias iroh::blobs::store::DbIter

pub type DbIter<T> = Box<dyn Iterator<Item = Result<T, Error>> + Send + Sync>;
Expand description

A fallible but owned iterator over the entries in a store.

Aliased Type§

struct DbIter<T>(/* private fields */);
\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/store/type.ExportProgressCb.html b/pr/2583/docs/iroh/blobs/store/type.ExportProgressCb.html index 80fee16e23..ec8f6b1338 100644 --- a/pr/2583/docs/iroh/blobs/store/type.ExportProgressCb.html +++ b/pr/2583/docs/iroh/blobs/store/type.ExportProgressCb.html @@ -1,2 +1,2 @@ -ExportProgressCb in iroh::blobs::store - Rust

Type Alias iroh::blobs::store::ExportProgressCb

source ·
pub type ExportProgressCb = Box<dyn Fn(u64) -> Result<(), Error> + Send + Sync>;
Expand description

Export trogress callback

+ExportProgressCb in iroh::blobs::store - Rust

Type Alias iroh::blobs::store::ExportProgressCb

pub type ExportProgressCb = Box<dyn Fn(u64) -> Result<(), Error> + Send + Sync>;
Expand description

Export trogress callback

Aliased Type§

struct ExportProgressCb(/* private fields */);
\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/struct.Hash.html b/pr/2583/docs/iroh/blobs/struct.Hash.html index 708c699cf8..a4c29b1184 100644 --- a/pr/2583/docs/iroh/blobs/struct.Hash.html +++ b/pr/2583/docs/iroh/blobs/struct.Hash.html @@ -1,37 +1,37 @@ -Hash in iroh::blobs - Rust

Struct iroh::blobs::Hash

source ·
pub struct Hash(/* private fields */);
Expand description

Hash type used throughout.

-

Implementations§

source§

impl Hash

source

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

-
source

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

-
source

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

-
source

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

-
source

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +Hash in iroh::blobs - Rust

Struct iroh::blobs::Hash

pub struct Hash(/* private fields */);
Expand description

Hash type used throughout.

+

Implementations§

§

impl Hash

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

+

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

+

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

+

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

+

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

+

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the hash.

-

Trait Implementations§

source§

impl AsRef<[u8]> for Hash

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<[u8]> for Hash

source§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
source§

impl Borrow<[u8; 32]> for Hash

source§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
source§

impl Clone for Hash

source§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Hash

Trait Implementations§

§

impl AsRef<[u8]> for Hash

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Borrow<[u8]> for Hash

§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
§

impl Borrow<[u8; 32]> for Hash

§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
§

impl Clone for Hash

§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Hash

§

fn deserialize<D>( deserializer: D ) -> Result<Hash, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&[u8; 32]> for Hash

source§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<[u8; 32]> for Hash

source§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for [u8; 32]

source§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

fn from_iter<T>(iter: T) -> HashSeq
where - T: IntoIterator<Item = Hash>,

Creates a value from an iterator. Read more
source§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for Hash

source§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<&[u8; 32]> for Hash

§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<[u8; 32]> for Hash

§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl FromIterator<Hash> for HashSeq

§

fn from_iter<T>(iter: T) -> HashSeq
where + T: IntoIterator<Item = Hash>,

Creates a value from an iterator. Read more
§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for Hash

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Key for Hash

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl MaxSize for Hash

source§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for Hash

source§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Key for Hash

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl MaxSize for Hash

§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for Hash

§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Hash

source§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
§

impl PartialEq for Hash

§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Hash

source§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Hash

§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for Hash

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for Hash

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where Hash: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <Hash as Value>::SelfType<'b> ) -> <Hash as Value>::AsBytes<'a>
where 'b: 'a, - Hash: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Copy for Hash

source§

impl Eq for Hash

source§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where + Hash: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for Hash

§

impl Eq for Hash

§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where @@ -166,7 +166,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/blobs/struct.HashAndFormat.html b/pr/2583/docs/iroh/blobs/struct.HashAndFormat.html index 94a65a0f48..c31ed6540a 100644 --- a/pr/2583/docs/iroh/blobs/struct.HashAndFormat.html +++ b/pr/2583/docs/iroh/blobs/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh::blobs - Rust

Struct iroh::blobs::HashAndFormat

source ·
pub struct HashAndFormat {
+HashAndFormat in iroh::blobs - Rust

Struct iroh::blobs::HashAndFormat

pub struct HashAndFormat {
     pub hash: Hash,
     pub format: BlobFormat,
 }
Expand description

A hash and format pair

Fields§

§hash: Hash

The hash

§format: BlobFormat

The format

-

Implementations§

source§

impl HashAndFormat

source

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

-
source

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

-
source

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

-

Trait Implementations§

source§

impl Clone for HashAndFormat

source§

fn clone(&self) -> HashAndFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for HashAndFormat

Implementations§

§

impl HashAndFormat

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

+

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

+

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

+

Trait Implementations§

§

impl Clone for HashAndFormat

§

fn clone(&self) -> HashAndFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for HashAndFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for HashAndFormat

§

fn deserialize<D>( deserializer: D ) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<DownloadKind> for HashAndFormat

source§

fn from(value: DownloadKind) -> HashAndFormat

Converts to this type from the input type.
source§

impl From<HashAndFormat> for DownloadKind

source§

fn from(value: HashAndFormat) -> DownloadKind

Converts to this type from the input type.
source§

impl From<HashAndFormat> for HashAndFormat

source§

fn from(value: HashAndFormat) -> HashAndFormat

Converts to this type from the input type.
source§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for HashAndFormat

source§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for HashAndFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<DownloadKind> for HashAndFormat

§

fn from(value: DownloadKind) -> HashAndFormat

Converts to this type from the input type.
§

impl From<HashAndFormat> for DownloadKind

§

fn from(value: HashAndFormat) -> DownloadKind

Converts to this type from the input type.
§

impl From<HashAndFormat> for HashAndFormat

§

fn from(value: HashAndFormat) -> HashAndFormat

Converts to this type from the input type.
§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for HashAndFormat

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl MaxSize for HashAndFormat

source§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for HashAndFormat

source§

fn cmp(&self, other: &HashAndFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl MaxSize for HashAndFormat

§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for HashAndFormat

§

fn cmp(&self, other: &HashAndFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for HashAndFormat

source§

fn eq(&self, other: &HashAndFormat) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for HashAndFormat

§

fn eq(&self, other: &HashAndFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for HashAndFormat

source§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for HashAndFormat

§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for HashAndFormat

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for HashAndFormat

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where HashAndFormat: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <HashAndFormat as Value>::SelfType<'b> ) -> <HashAndFormat as Value>::AsBytes<'a>
where 'b: 'a, - HashAndFormat: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Copy for HashAndFormat

source§

impl Eq for HashAndFormat

source§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + HashAndFormat: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for HashAndFormat

§

impl Eq for HashAndFormat

§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where @@ -156,7 +156,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/blobs/struct.Tag.html b/pr/2583/docs/iroh/blobs/struct.Tag.html index 1a329c5665..a6e5e7a80f 100644 --- a/pr/2583/docs/iroh/blobs/struct.Tag.html +++ b/pr/2583/docs/iroh/blobs/struct.Tag.html @@ -1,32 +1,32 @@ -Tag in iroh::blobs - Rust

Struct iroh::blobs::Tag

source ·
pub struct Tag(pub Bytes);
Expand description

A tag

-

Tuple Fields§

§0: Bytes

Implementations§

source§

impl Tag

source

pub fn auto(time: SystemTime, exists: impl Fn(&[u8]) -> bool) -> Tag

Create a new tag that does not exist yet.

-

Trait Implementations§

source§

impl Borrow<[u8]> for Tag

source§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
source§

impl Clone for Tag

source§

fn clone(&self) -> Tag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Tag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Tag

source§

fn deserialize<__D>( +Tag in iroh::blobs - Rust

Struct iroh::blobs::Tag

pub struct Tag(pub Bytes);
Expand description

A tag

+

Tuple Fields§

§0: Bytes

Implementations§

§

impl Tag

pub fn auto(time: SystemTime, exists: impl Fn(&[u8]) -> bool) -> Tag

Create a new tag that does not exist yet.

+

Trait Implementations§

§

impl Borrow<[u8]> for Tag

§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
§

impl Clone for Tag

§

fn clone(&self) -> Tag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Tag

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Tag

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Tag, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Tag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&str> for Tag

source§

fn from(value: &str) -> Tag

Converts to this type from the input type.
source§

impl From<Bytes> for Tag

source§

fn from(value: Bytes) -> Tag

Converts to this type from the input type.
source§

impl From<String> for Tag

source§

fn from(value: String) -> Tag

Converts to this type from the input type.
source§

impl Key for Tag

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl Ord for Tag

source§

fn cmp(&self, other: &Tag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Tag

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<&str> for Tag

§

fn from(value: &str) -> Tag

Converts to this type from the input type.
§

impl From<Bytes> for Tag

§

fn from(value: Bytes) -> Tag

Converts to this type from the input type.
§

impl From<String> for Tag

§

fn from(value: String) -> Tag

Converts to this type from the input type.
§

impl Key for Tag

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl Ord for Tag

§

fn cmp(&self, other: &Tag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Tag

source§

fn eq(&self, other: &Tag) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Tag

§

fn eq(&self, other: &Tag) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Tag

source§

fn partial_cmp(&self, other: &Tag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Tag

§

fn partial_cmp(&self, other: &Tag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl RedbKey for Tag

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl RedbValue for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as RedbValue>::SelfType<'a>
where +operator. Read more

§

impl RedbKey for Tag

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl RedbValue for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as RedbValue>::SelfType<'a>
where Tag: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <Tag as RedbValue>::SelfType<'b> ) -> <Tag as RedbValue>::AsBytes<'a>
where 'b: 'a, - Tag: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Serialize for Tag

source§

fn serialize<__S>( + Tag: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Serialize for Tag

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as Value>::SelfType<'a>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as Value>::SelfType<'a>
where Tag: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <Tag as Value>::SelfType<'b> ) -> <Tag as Value>::AsBytes<'a>
where 'b: 'a, - Tag: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Eq for Tag

source§

impl StructuralPartialEq for Tag

Auto Trait Implementations§

§

impl !Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnwindSafe for Tag

Blanket Implementations§

source§

impl<T> Any for T
where + Tag: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Eq for Tag

§

impl StructuralPartialEq for Tag

Auto Trait Implementations§

§

impl !Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnwindSafe for Tag

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/struct.TempTag.html b/pr/2583/docs/iroh/blobs/struct.TempTag.html index fe918db004..3f870ea734 100644 --- a/pr/2583/docs/iroh/blobs/struct.TempTag.html +++ b/pr/2583/docs/iroh/blobs/struct.TempTag.html @@ -1,16 +1,16 @@ -TempTag in iroh::blobs - Rust

Struct iroh::blobs::TempTag

source ·
pub struct TempTag { /* private fields */ }
Expand description

A hash and format pair that is protected from garbage collection.

+TempTag in iroh::blobs - Rust

Struct iroh::blobs::TempTag

pub struct TempTag { /* private fields */ }
Expand description

A hash and format pair that is protected from garbage collection.

If format is raw, this will protect just the blob If format is collection, this will protect the collection and all blobs in it

-

Implementations§

source§

impl TempTag

source

pub fn new(inner: HashAndFormat, on_drop: Option<Weak<dyn TagDrop>>) -> TempTag

Create a new temp tag for the given hash and format

+

Implementations§

§

impl TempTag

pub fn new(inner: HashAndFormat, on_drop: Option<Weak<dyn TagDrop>>) -> TempTag

Create a new temp tag for the given hash and format

This should only be used by store implementations.

The caller is responsible for increasing the refcount on creation and to make sure that temp tags that are created between a mark phase and a sweep phase are protected.

-
source

pub fn inner(&self) -> &HashAndFormat

The hash of the pinned item

-
source

pub fn hash(&self) -> &Hash

The hash of the pinned item

-
source

pub fn format(&self) -> BlobFormat

The format of the pinned item

-
source

pub fn leak(self)

Keep the item alive until the end of the process

-

Trait Implementations§

source§

impl Debug for TempTag

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Drop for TempTag

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

pub fn inner(&self) -> &HashAndFormat

The hash of the pinned item

+

pub fn hash(&self) -> &Hash

The hash of the pinned item

+

pub fn format(&self) -> BlobFormat

The format of the pinned item

+

pub fn leak(self)

Keep the item alive until the end of the process

+

Trait Implementations§

§

impl Debug for TempTag

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Drop for TempTag

§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/enum.MemOrFile.html b/pr/2583/docs/iroh/blobs/util/enum.MemOrFile.html index f4bd19825b..922f1eda52 100644 --- a/pr/2583/docs/iroh/blobs/util/enum.MemOrFile.html +++ b/pr/2583/docs/iroh/blobs/util/enum.MemOrFile.html @@ -1,4 +1,4 @@ -MemOrFile in iroh::blobs::util - Rust

Enum iroh::blobs::util::MemOrFile

source ·
pub enum MemOrFile<M, F> {
+MemOrFile in iroh::blobs::util - Rust

Enum iroh::blobs::util::MemOrFile

pub enum MemOrFile<M, F> {
     Mem(M),
     File(F),
 }
Expand description

This is a general purpose Either, just like Result, except that the two cases @@ -6,24 +6,24 @@ external and only available via io.

Variants§

§

Mem(M)

We got it all in memory

§

File(F)

A file

-

Implementations§

source§

impl<M, F> MemOrFile<M, (F, u64)>
where +

Implementations§

§

impl<M, F> MemOrFile<M, (F, u64)>
where M: AsRef<[u8]>,

Helper methods for a common way to use MemOrFile, where the memory part is something like a slice, and the file part is a tuple consisiting of path or file and size.

-
source

pub fn size(&self) -> u64

Get the size of the MemOrFile

-
source§

impl<M, F> MemOrFile<M, F>

source

pub fn as_ref(&self) -> MemOrFile<&M, &F>

Turn a reference to a MemOrFile into a MemOrFile of references

-
source

pub fn is_mem(&self) -> bool

True if this is a Mem

-
source

pub fn mem(&self) -> Option<&M>

Get the mem part

-
source

pub fn map_file<F2>(self, f: impl FnOnce(F) -> F2) -> MemOrFile<M, F2>

Map the file part of this MemOrFile

-
source

pub fn try_map_file<F2, E>( +

pub fn size(&self) -> u64

Get the size of the MemOrFile

+
§

impl<M, F> MemOrFile<M, F>

pub fn as_ref(&self) -> MemOrFile<&M, &F>

Turn a reference to a MemOrFile into a MemOrFile of references

+

pub fn is_mem(&self) -> bool

True if this is a Mem

+

pub fn mem(&self) -> Option<&M>

Get the mem part

+

pub fn map_file<F2>(self, f: impl FnOnce(F) -> F2) -> MemOrFile<M, F2>

Map the file part of this MemOrFile

+

pub fn try_map_file<F2, E>( self, f: impl FnOnce(F) -> Result<F2, E> ) -> Result<MemOrFile<M, F2>, E>

Try to map the file part of this MemOrFile

-
source

pub fn map_mem<M2>(self, f: impl FnOnce(M) -> M2) -> MemOrFile<M2, F>

Map the memory part of this MemOrFile

-

Trait Implementations§

source§

impl<M, F> Debug for MemOrFile<M, F>
where +

pub fn map_mem<M2>(self, f: impl FnOnce(M) -> M2) -> MemOrFile<M2, F>

Map the memory part of this MemOrFile

+

Trait Implementations§

§

impl<M, F> Debug for MemOrFile<M, F>
where M: Debug, - F: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<M, F> Default for MemOrFile<M, F>
where - M: Default,

source§

fn default() -> MemOrFile<M, F>

Returns the “default value” for a type. Read more
source§

impl ReadAt for MemOrFile<Bytes, File>

source§

fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<usize, Error>

Reads bytes from an offset in this source into a buffer, returning how -many bytes were read. Read more
source§

fn read_exact_at(&self, pos: u64, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf from an offset. Read more
source§

impl Size for MemOrFile<Bytes, File>

source§

fn size(&self) -> Result<Option<u64>, Error>

Get the size of this object, in bytes. Read more

Auto Trait Implementations§

§

impl<M, F> Freeze for MemOrFile<M, F>
where + F: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<M, F> Default for MemOrFile<M, F>
where + M: Default,

§

fn default() -> MemOrFile<M, F>

Returns the “default value” for a type. Read more
§

impl ReadAt for MemOrFile<Bytes, File>

§

fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<usize, Error>

Reads bytes from an offset in this source into a buffer, returning how +many bytes were read. Read more
source§

fn read_exact_at(&self, pos: u64, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf from an offset. Read more
§

impl Size for MemOrFile<Bytes, File>

§

fn size(&self) -> Result<Option<u64>, Error>

Get the size of this object, in bytes. Read more

Auto Trait Implementations§

§

impl<M, F> Freeze for MemOrFile<M, F>
where M: Freeze, F: Freeze,

§

impl<M, F> RefUnwindSafe for MemOrFile<M, F>
where M: RefUnwindSafe, diff --git a/pr/2583/docs/iroh/blobs/util/enum.SetTagOption.html b/pr/2583/docs/iroh/blobs/util/enum.SetTagOption.html index 1f1c39dae5..cdb0a2d49b 100644 --- a/pr/2583/docs/iroh/blobs/util/enum.SetTagOption.html +++ b/pr/2583/docs/iroh/blobs/util/enum.SetTagOption.html @@ -1,24 +1,24 @@ -SetTagOption in iroh::blobs::util - Rust

Enum iroh::blobs::util::SetTagOption

source ·
pub enum SetTagOption {
+SetTagOption in iroh::blobs::util - Rust

Enum iroh::blobs::util::SetTagOption

pub enum SetTagOption {
     Auto,
     Named(Tag),
 }
Expand description

Option for commands that allow setting a tag

Variants§

§

Auto

A tag will be automatically generated

§

Named(Tag)

The tag is explicitly named

-

Trait Implementations§

source§

impl Clone for SetTagOption

source§

fn clone(&self) -> SetTagOption

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SetTagOption

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SetTagOption

Trait Implementations§

§

impl Clone for SetTagOption

§

fn clone(&self) -> SetTagOption

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SetTagOption

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SetTagOption

§

fn deserialize<__D>( __deserializer: __D ) -> Result<SetTagOption, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Ord for SetTagOption

source§

fn cmp(&self, other: &SetTagOption) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Ord for SetTagOption

§

fn cmp(&self, other: &SetTagOption) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for SetTagOption

source§

fn eq(&self, other: &SetTagOption) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for SetTagOption

§

fn eq(&self, other: &SetTagOption) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for SetTagOption

source§

fn partial_cmp(&self, other: &SetTagOption) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for SetTagOption

§

fn partial_cmp(&self, other: &SetTagOption) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for SetTagOption

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for SetTagOption

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SetTagOption

source§

impl StructuralPartialEq for SetTagOption

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for SetTagOption

§

impl StructuralPartialEq for SetTagOption

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/fn.total_bytes.html b/pr/2583/docs/iroh/blobs/util/fn.total_bytes.html index dce87a14cc..11bf67c270 100644 --- a/pr/2583/docs/iroh/blobs/util/fn.total_bytes.html +++ b/pr/2583/docs/iroh/blobs/util/fn.total_bytes.html @@ -1,3 +1,3 @@ -total_bytes in iroh::blobs::util - Rust

Function iroh::blobs::util::total_bytes

source ·
pub fn total_bytes(ranges: RangeSet<[ChunkNum; 2]>, size: u64) -> u64
Expand description

Get the number of bytes given a set of chunk ranges and the total size.

+total_bytes in iroh::blobs::util - Rust

Function iroh::blobs::util::total_bytes

pub fn total_bytes(ranges: RangeSet<[ChunkNum; 2]>, size: u64) -> u64
Expand description

Get the number of bytes given a set of chunk ranges and the total size.

If some ranges are out of bounds, they will be clamped to the size.

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/util/index.html b/pr/2583/docs/iroh/blobs/util/index.html index c6d58d34b1..063895b6c1 100644 --- a/pr/2583/docs/iroh/blobs/util/index.html +++ b/pr/2583/docs/iroh/blobs/util/index.html @@ -1,4 +1,4 @@ -iroh::blobs::util - Rust

Module iroh::blobs::util

source ·
Expand description

Utility functions and types.

+iroh::blobs::util - Rust

Module iroh::blobs::util

Expand description

Utility functions and types.

Modules§

  • Utilities for working with tokio io
  • A local task pool with proper shutdown
  • Utilities for reporting progress.

Structs§

  • A file that is sparse in memory
  • A tag
  • A hash and format pair that is protected from garbage collection.

Enums§

  • This is a general purpose Either, just like Result, except that the two cases are Mem for something that is in memory, and File for something that is somewhere external and only available via io.
  • Option for commands that allow setting a tag

Traits§

§

impl<W> Debug for TrackingWriter<W>
where + W: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<W> Freeze for TrackingWriter<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for TrackingWriter<W>
where W: RefUnwindSafe,

§

impl<W> Send for TrackingWriter<W>
where W: Send,

§

impl<W> Sync for TrackingWriter<W>
where diff --git a/pr/2583/docs/iroh/blobs/util/local_pool/enum.PanicMode.html b/pr/2583/docs/iroh/blobs/util/local_pool/enum.PanicMode.html index 41203570e3..06227d6f9e 100644 --- a/pr/2583/docs/iroh/blobs/util/local_pool/enum.PanicMode.html +++ b/pr/2583/docs/iroh/blobs/util/local_pool/enum.PanicMode.html @@ -1,4 +1,4 @@ -PanicMode in iroh::blobs::util::local_pool - Rust

Enum iroh::blobs::util::local_pool::PanicMode

source ·
pub enum PanicMode {
+PanicMode in iroh::blobs::util::local_pool - Rust

Enum iroh::blobs::util::local_pool::PanicMode

pub enum PanicMode {
     LogAndContinue,
     Shutdown,
 }
Expand description

What to do when a panic occurs in a pool thread

@@ -6,9 +6,9 @@

The panic will be re-thrown when the pool is dropped.

§

Shutdown

Log the panic and immediately shut down the pool.

The panic will be re-thrown when the pool is dropped.

-

Trait Implementations§

source§

impl Clone for PanicMode

source§

fn clone(&self) -> PanicMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PanicMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq for PanicMode

source§

fn eq(&self, other: &PanicMode) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for PanicMode

§

fn clone(&self) -> PanicMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for PanicMode

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl PartialEq for PanicMode

§

fn eq(&self, other: &PanicMode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for PanicMode

source§

impl Eq for PanicMode

source§

impl StructuralPartialEq for PanicMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

§

impl Copy for PanicMode

§

impl Eq for PanicMode

§

impl StructuralPartialEq for PanicMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/local_pool/enum.SpawnError.html b/pr/2583/docs/iroh/blobs/util/local_pool/enum.SpawnError.html index 0a6776ffda..17986ae626 100644 --- a/pr/2583/docs/iroh/blobs/util/local_pool/enum.SpawnError.html +++ b/pr/2583/docs/iroh/blobs/util/local_pool/enum.SpawnError.html @@ -1,8 +1,8 @@ -SpawnError in iroh::blobs::util::local_pool - Rust

Enum iroh::blobs::util::local_pool::SpawnError

source ·
pub enum SpawnError {
+SpawnError in iroh::blobs::util::local_pool - Rust

Enum iroh::blobs::util::local_pool::SpawnError

pub enum SpawnError {
     Cancelled,
 }
Expand description

Errors for spawn failures

Variants§

§

Cancelled

Task was dropped, either due to a panic or because the pool was shut down.

-

Trait Implementations§

source§

impl Debug for SpawnError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for SpawnError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for SpawnError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for SpawnError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for SpawnError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for SpawnError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/local_pool/index.html b/pr/2583/docs/iroh/blobs/util/local_pool/index.html index c40fcc1bd9..8c499191ef 100644 --- a/pr/2583/docs/iroh/blobs/util/local_pool/index.html +++ b/pr/2583/docs/iroh/blobs/util/local_pool/index.html @@ -1,2 +1,2 @@ -iroh::blobs::util::local_pool - Rust

Module iroh::blobs::util::local_pool

source ·
Expand description

A local task pool with proper shutdown

+iroh::blobs::util::local_pool - Rust

Module iroh::blobs::util::local_pool

Expand description

A local task pool with proper shutdown

Structs§

Enums§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/util/local_pool/struct.Config.html b/pr/2583/docs/iroh/blobs/util/local_pool/struct.Config.html index 32d6c9045d..6e1a3afc3a 100644 --- a/pr/2583/docs/iroh/blobs/util/local_pool/struct.Config.html +++ b/pr/2583/docs/iroh/blobs/util/local_pool/struct.Config.html @@ -1,4 +1,4 @@ -Config in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::Config

source ·
pub struct Config {
+Config in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::Config

pub struct Config {
     pub threads: usize,
     pub thread_name_prefix: &'static str,
     pub panic_mode: PanicMode,
@@ -6,7 +6,7 @@
 

Fields§

§threads: usize

Number of threads in the pool

§thread_name_prefix: &'static str

Prefix for thread names

§panic_mode: PanicMode

Ignore panics in pool threads

-

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Config

source§

fn default() -> Config

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Config

§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Config

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Config

§

fn default() -> Config

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPool.html b/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPool.html index 159e37d08c..bd1dd35dad 100644 --- a/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPool.html +++ b/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPool.html @@ -1,4 +1,4 @@ -LocalPool in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::LocalPool

source ·
pub struct LocalPool { /* private fields */ }
Expand description

A local task pool with proper shutdown

+LocalPool in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::LocalPool

pub struct LocalPool { /* private fields */ }
Expand description

A local task pool with proper shutdown

Unlike LocalPoolHandle, this pool will join all its threads when dropped, ensuring that all Drop @@ -11,58 +11,58 @@ and then wait for all threads to finish executing their loops before returning. This means that all currently executing tasks will be allowed to run to completion.

-

Implementations§

source§

impl LocalPool

source

pub fn single() -> LocalPool

Create a new local pool with a single std thread.

-
source

pub fn new(config: Config) -> LocalPool

Create a new local pool with the given config.

+

Implementations§

§

impl LocalPool

pub fn single() -> LocalPool

Create a new local pool with a single std thread.

+

pub fn new(config: Config) -> LocalPool

Create a new local pool with the given config.

This will use the current tokio runtime handle, so it must be called from within a tokio runtime.

-
source

pub fn handle(&self) -> &LocalPoolHandle

Get a cheaply cloneable handle to the pool

+

pub fn handle(&self) -> &LocalPoolHandle

Get a cheaply cloneable handle to the pool

This is not strictly necessary since we implement deref for LocalPoolHandle, but makes getting a handle more explicit.

-
source

pub async fn cancelled(&self)

A future that resolves when the pool is cancelled

-
source

pub async fn shutdown(self)

Immediately stop polling all tasks and wait for all threads to finish.

+

pub async fn cancelled(&self)

A future that resolves when the pool is cancelled

+

pub async fn shutdown(self)

Immediately stop polling all tasks and wait for all threads to finish.

This is like drop, but waits for thread completion asynchronously.

If there was a panic on any of the threads, it will be re-thrown here.

-
source

pub async fn finish(self)

Gently shut down the pool

+

pub async fn finish(self)

Gently shut down the pool

Notifies all the pool threads to shut down and waits for them to finish.

If you just want to drop the pool without giving the threads a chance to process their remaining tasks, just use Self::shutdown.

If you want to wait for only a limited time for the tasks to finish, you can race this function with a timeout.

-

Methods from Deref<Target = LocalPoolHandle>§

source

pub fn waiting_tasks(&self) -> usize

Get the number of tasks in the queue

+

Methods from Deref<Target = LocalPoolHandle>§

pub fn waiting_tasks(&self) -> usize

Get the number of tasks in the queue

This is not the number of tasks being executed, but the number of tasks waiting to be scheduled for execution. If this number is high, it indicates that the pool is very busy.

You might want to use this to throttle or reject requests.

-
source

pub fn try_spawn<T, F, Fut>(&self, gen: F) -> Result<Run<T>, SpawnError>
where +

pub fn try_spawn<T, F, Fut>(&self, gen: F) -> Result<Run<T>, SpawnError>
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = T> + 'static, T: Send + 'static,

Spawn a task in the pool and return a future that resolves when the task is done.

If you don’t care about the result, prefer LocalPoolHandle::spawn_detached since it is more efficient.

-
source

pub fn try_spawn_detached<F, Fut>(&self, gen: F) -> Result<(), SpawnError>
where +

pub fn try_spawn_detached<F, Fut>(&self, gen: F) -> Result<(), SpawnError>
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = ()> + 'static,

Spawn a task in the pool.

The task will run to completion unless the pool is shut down or the task panics. In case of panic, the pool will either log the panic and continue or immediately shut down, depending on the PanicMode.

-
source

pub fn spawn<T, F, Fut>(&self, gen: F) -> Run<T>
where +

pub fn spawn<T, F, Fut>(&self, gen: F) -> Run<T>
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = T> + 'static, T: Send + 'static,

Spawn a task in the pool and await the result.

Like LocalPoolHandle::try_spawn, but panics if the pool is shut down.

-
source

pub fn spawn_detached<F, Fut>(&self, gen: F)
where +

pub fn spawn_detached<F, Fut>(&self, gen: F)
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = ()> + 'static,

Spawn a task in the pool.

Like LocalPoolHandle::try_spawn_detached, but panics if the pool is shut down.

-
source

pub fn try_spawn_detached_boxed( +

pub fn try_spawn_detached_boxed( &self, gen: Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = ()>>> + Send> ) -> Result<(), SpawnError>

Spawn a task in the pool.

This is like LocalPoolHandle::try_spawn_detached, but assuming that the generator function is already boxed. This is the lowest overhead way to spawn a task in the pool.

-

Trait Implementations§

source§

impl Debug for LocalPool

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for LocalPool

source§

fn default() -> LocalPool

Returns the “default value” for a type. Read more
source§

impl Deref for LocalPool

§

type Target = LocalPoolHandle

The resulting type after dereferencing.
source§

fn deref(&self) -> &<LocalPool as Deref>::Target

Dereferences the value.
source§

impl Drop for LocalPool

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for LocalPool

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for LocalPool

§

fn default() -> LocalPool

Returns the “default value” for a type. Read more
§

impl Deref for LocalPool

§

type Target = LocalPoolHandle

The resulting type after dereferencing.
§

fn deref(&self) -> &<LocalPool as Deref>::Target

Dereferences the value.
§

impl Drop for LocalPool

§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPoolHandle.html b/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPoolHandle.html index 9a941322d2..e6c0d13a1c 100644 --- a/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPoolHandle.html +++ b/pr/2583/docs/iroh/blobs/util/local_pool/struct.LocalPoolHandle.html @@ -1,39 +1,39 @@ -LocalPoolHandle in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::LocalPoolHandle

source ·
pub struct LocalPoolHandle { /* private fields */ }
Expand description

A handle to a LocalPool

-

Implementations§

source§

impl LocalPoolHandle

source

pub fn waiting_tasks(&self) -> usize

Get the number of tasks in the queue

+LocalPoolHandle in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::LocalPoolHandle

pub struct LocalPoolHandle { /* private fields */ }
Expand description

A handle to a LocalPool

+

Implementations§

§

impl LocalPoolHandle

pub fn waiting_tasks(&self) -> usize

Get the number of tasks in the queue

This is not the number of tasks being executed, but the number of tasks waiting to be scheduled for execution. If this number is high, it indicates that the pool is very busy.

You might want to use this to throttle or reject requests.

-
source

pub fn try_spawn<T, F, Fut>(&self, gen: F) -> Result<Run<T>, SpawnError>
where +

pub fn try_spawn<T, F, Fut>(&self, gen: F) -> Result<Run<T>, SpawnError>
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = T> + 'static, T: Send + 'static,

Spawn a task in the pool and return a future that resolves when the task is done.

If you don’t care about the result, prefer LocalPoolHandle::spawn_detached since it is more efficient.

-
source

pub fn try_spawn_detached<F, Fut>(&self, gen: F) -> Result<(), SpawnError>
where +

pub fn try_spawn_detached<F, Fut>(&self, gen: F) -> Result<(), SpawnError>
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = ()> + 'static,

Spawn a task in the pool.

The task will run to completion unless the pool is shut down or the task panics. In case of panic, the pool will either log the panic and continue or immediately shut down, depending on the PanicMode.

-
source

pub fn spawn<T, F, Fut>(&self, gen: F) -> Run<T>
where +

pub fn spawn<T, F, Fut>(&self, gen: F) -> Run<T>
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = T> + 'static, T: Send + 'static,

Spawn a task in the pool and await the result.

Like LocalPoolHandle::try_spawn, but panics if the pool is shut down.

-
source

pub fn spawn_detached<F, Fut>(&self, gen: F)
where +

pub fn spawn_detached<F, Fut>(&self, gen: F)
where F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = ()> + 'static,

Spawn a task in the pool.

Like LocalPoolHandle::try_spawn_detached, but panics if the pool is shut down.

-
source

pub fn try_spawn_detached_boxed( +

pub fn try_spawn_detached_boxed( &self, gen: Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = ()>>> + Send> ) -> Result<(), SpawnError>

Spawn a task in the pool.

This is like LocalPoolHandle::try_spawn_detached, but assuming that the generator function is already boxed. This is the lowest overhead way to spawn a task in the pool.

-

Trait Implementations§

source§

impl Clone for LocalPoolHandle

source§

fn clone(&self) -> LocalPoolHandle

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LocalPoolHandle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for LocalPoolHandle

§

fn clone(&self) -> LocalPoolHandle

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for LocalPoolHandle

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/local_pool/struct.Run.html b/pr/2583/docs/iroh/blobs/util/local_pool/struct.Run.html index 99b0f655fd..41aeaceed0 100644 --- a/pr/2583/docs/iroh/blobs/util/local_pool/struct.Run.html +++ b/pr/2583/docs/iroh/blobs/util/local_pool/struct.Run.html @@ -1,11 +1,11 @@ -Run in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::Run

source ·
pub struct Run<T>(/* private fields */);
Expand description

Future returned by LocalPoolHandle::spawn and LocalPoolHandle::try_spawn.

+Run in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::Run

pub struct Run<T>(/* private fields */);
Expand description

Future returned by LocalPoolHandle::spawn and LocalPoolHandle::try_spawn.

Dropping this future will immediately cancel the task. The task can fail if the pool is shut down or if the task panics. In both cases the future will resolve to SpawnError::Cancelled.

-

Implementations§

source§

impl<T> Run<T>

source

pub fn abort(&mut self)

Abort the task

+

Implementations§

§

impl<T> Run<T>

pub fn abort(&mut self)

Abort the task

Dropping the future will also abort the task.

-

Trait Implementations§

source§

impl<T> Debug for Run<T>
where - T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Future for Run<T>

§

type Output = Result<T, SpawnError>

The type of value produced on completion.
source§

fn poll( +

Trait Implementations§

§

impl<T> Debug for Run<T>
where + T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> Future for Run<T>

§

type Output = Result<T, SpawnError>

The type of value produced on completion.
§

fn poll( self: Pin<&mut Run<T>>, cx: &mut Context<'_> ) -> Poll<<Run<T> as Future>::Output>

Attempt to resolve the future to a final value, registering diff --git a/pr/2583/docs/iroh/blobs/util/progress/enum.ProgressSendError.html b/pr/2583/docs/iroh/blobs/util/progress/enum.ProgressSendError.html index 397fbec519..9c44769396 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/enum.ProgressSendError.html +++ b/pr/2583/docs/iroh/blobs/util/progress/enum.ProgressSendError.html @@ -1,9 +1,9 @@ -ProgressSendError in iroh::blobs::util::progress - Rust

Enum iroh::blobs::util::progress::ProgressSendError

source ·
pub enum ProgressSendError {
+ProgressSendError in iroh::blobs::util::progress - Rust

Enum iroh::blobs::util::progress::ProgressSendError

pub enum ProgressSendError {
     ReceiverDropped,
 }
Expand description

An error that can occur when sending progress messages.

Really the only error that can occur is if the receiver is dropped.

Variants§

§

ReceiverDropped

The receiver was dropped.

-

Trait Implementations§

source§

impl Clone for ProgressSendError

source§

fn clone(&self) -> ProgressSendError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ProgressSendError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for ProgressSendError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for ProgressSendError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<ProgressSendError> for GetError

source§

fn from(value: ProgressSendError) -> GetError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for ProgressSendError

§

fn clone(&self) -> ProgressSendError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ProgressSendError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ProgressSendError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for ProgressSendError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ProgressSendError> for GetError

§

fn from(value: ProgressSendError) -> GetError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/progress/index.html b/pr/2583/docs/iroh/blobs/util/progress/index.html index f2e0edb805..3b4699e7ee 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/index.html +++ b/pr/2583/docs/iroh/blobs/util/progress/index.html @@ -1,4 +1,4 @@ -iroh::blobs::util::progress - Rust

Module iroh::blobs::util::progress

source ·
Expand description

Utilities for reporting progress.

+iroh::blobs::util::progress - Rust

Module iroh::blobs::util::progress

Expand description

Utilities for reporting progress.

The main entry point is the ProgressSender trait.

Structs§

Enums§

Traits§

  • An id generator, to be combined with a progress sender.
  • A general purpose progress sender. This should be usable for reporting progress from both blocking and non-blocking contexts.

Type Aliases§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.AsyncChannelProgressSender.html b/pr/2583/docs/iroh/blobs/util/progress/struct.AsyncChannelProgressSender.html index 1a3967e6db..f90ee6b3b4 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.AsyncChannelProgressSender.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.AsyncChannelProgressSender.html @@ -1,21 +1,21 @@ -AsyncChannelProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::AsyncChannelProgressSender

source ·
pub struct AsyncChannelProgressSender<T> { /* private fields */ }
Expand description

A progress sender that uses an async channel.

-

Implementations§

source§

impl<T> AsyncChannelProgressSender<T>

source

pub fn new(sender: Sender<T>) -> AsyncChannelProgressSender<T>

Create a new progress sender from an async channel sender.

-
source

pub fn same_channel(&self, other: &AsyncChannelProgressSender<T>) -> bool

Returns true if other sends on the same async_channel channel as self.

-

Trait Implementations§

source§

impl<T> Clone for AsyncChannelProgressSender<T>

source§

fn clone(&self) -> AsyncChannelProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for AsyncChannelProgressSender<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> IdGenerator for AsyncChannelProgressSender<T>

source§

fn new_id(&self) -> u64

Get a new unique id
source§

impl<T> ProgressSender for AsyncChannelProgressSender<T>
where - T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
source§

async fn send( +AsyncChannelProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::AsyncChannelProgressSender

pub struct AsyncChannelProgressSender<T> { /* private fields */ }
Expand description

A progress sender that uses an async channel.

+

Implementations§

§

impl<T> AsyncChannelProgressSender<T>

pub fn new(sender: Sender<T>) -> AsyncChannelProgressSender<T>

Create a new progress sender from an async channel sender.

+

pub fn same_channel(&self, other: &AsyncChannelProgressSender<T>) -> bool

Returns true if other sends on the same async_channel channel as self.

+

Trait Implementations§

§

impl<T> Clone for AsyncChannelProgressSender<T>

§

fn clone(&self) -> AsyncChannelProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for AsyncChannelProgressSender<T>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> IdGenerator for AsyncChannelProgressSender<T>

§

fn new_id(&self) -> u64

Get a new unique id
§

impl<T> ProgressSender for AsyncChannelProgressSender<T>
where + T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
§

async fn send( &self, msg: <AsyncChannelProgressSender<T> as ProgressSender>::Msg -) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
source§

fn try_send( +) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
§

fn try_send( &self, msg: <AsyncChannelProgressSender<T> as ProgressSender>::Msg -) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
source§

fn blocking_send( +) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
§

fn blocking_send( &self, msg: <AsyncChannelProgressSender<T> as ProgressSender>::Msg -) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
source§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>

Send a message and block if the receiver is full. Read more
§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
source§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where + F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
source§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where + F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where Self: IdGenerator,

Create a boxed progress sender to get rid of the concrete type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.BoxedProgressSender.html b/pr/2583/docs/iroh/blobs/util/progress/struct.BoxedProgressSender.html index 064ff6658b..4874c00f34 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.BoxedProgressSender.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.BoxedProgressSender.html @@ -1,11 +1,11 @@ -BoxedProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::BoxedProgressSender

source ·
pub struct BoxedProgressSender<T>(/* private fields */);
Expand description

A boxed progress sender

-

Trait Implementations§

source§

impl<T> Clone for BoxedProgressSender<T>

source§

fn clone(&self) -> BoxedProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for BoxedProgressSender<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> IdGenerator for BoxedProgressSender<T>
where - T: Send + Sync + 'static,

source§

fn new_id(&self) -> u64

Get a new unique id
source§

impl<T> ProgressSender for BoxedProgressSender<T>
where - T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
source§

async fn send(&self, msg: T) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
source§

fn try_send(&self, msg: T) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
source§

fn blocking_send(&self, msg: T) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
source§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where +BoxedProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::BoxedProgressSender

pub struct BoxedProgressSender<T>(/* private fields */);
Expand description

A boxed progress sender

+

Trait Implementations§

§

impl<T> Clone for BoxedProgressSender<T>

§

fn clone(&self) -> BoxedProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for BoxedProgressSender<T>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> IdGenerator for BoxedProgressSender<T>
where + T: Send + Sync + 'static,

§

fn new_id(&self) -> u64

Get a new unique id
§

impl<T> ProgressSender for BoxedProgressSender<T>
where + T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
§

async fn send(&self, msg: T) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
§

fn try_send(&self, msg: T) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
§

fn blocking_send(&self, msg: T) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
source§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where + F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
source§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where + F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where Self: IdGenerator,

Create a boxed progress sender to get rid of the concrete type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.FallibleProgressSliceWriter.html b/pr/2583/docs/iroh/blobs/util/progress/struct.FallibleProgressSliceWriter.html index 3a8b801ac5..999a6f8b74 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.FallibleProgressSliceWriter.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.FallibleProgressSliceWriter.html @@ -1,23 +1,23 @@ -FallibleProgressSliceWriter in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::FallibleProgressSliceWriter

source ·
pub struct FallibleProgressSliceWriter<W, F>(/* private fields */);
Expand description

A slice writer that adds a fallible progress callback.

+FallibleProgressSliceWriter in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::FallibleProgressSliceWriter

pub struct FallibleProgressSliceWriter<W, F>(/* private fields */);
Expand description

A slice writer that adds a fallible progress callback.

This wraps any AsyncSliceWriter, passes through all operations to the inner writer, and calls the passed on_write callback whenever data is written. on_write must return an io::Result, and can abort the download by returning an error.

-

Implementations§

source§

impl<W, F> FallibleProgressSliceWriter<W, F>
where +

Implementations§

§

impl<W, F> FallibleProgressSliceWriter<W, F>
where W: AsyncSliceWriter, - F: Fn(u64, usize) -> Result<(), Error> + 'static,

source

pub fn new(inner: W, on_write: F) -> FallibleProgressSliceWriter<W, F>

Create a new ProgressSliceWriter from an inner writer and a progress callback

+ F: Fn(u64, usize) -> Result<(), Error> + 'static,

pub fn new(inner: W, on_write: F) -> FallibleProgressSliceWriter<W, F>

Create a new ProgressSliceWriter from an inner writer and a progress callback

The on_write function is called for each write, with the offset as the first and the length of the data as the second param. on_write must return a future which resolves to an io::Result. If on_write returns an error, the download is aborted.

-
source

pub fn into_inner(self) -> W

Return the inner writer.

-

Trait Implementations§

source§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where +

pub fn into_inner(self) -> W

Return the inner writer.

+

Trait Implementations§

§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where W: AsyncSliceWriter + 'static, - F: Fn(u64, usize) -> Result<(), Error> + 'static,

source§

async fn write_bytes_at( + F: Fn(u64, usize) -> Result<(), Error> + 'static,

§

async fn write_bytes_at( &mut self, offset: u64, data: Bytes -) -> Result<(), Error>

Write the entire Bytes at the given position. Read more
source§

async fn write_at(&mut self, offset: u64, data: &[u8]) -> Result<(), Error>

Write the entire slice at the given position. Read more
source§

async fn sync(&mut self) -> Result<(), Error>

Sync any buffers to the underlying storage.
source§

async fn set_len(&mut self, size: u64) -> Result<(), Error>

Set the length of the underlying storage.
source§

impl<W, F> Debug for FallibleProgressSliceWriter<W, F>
where +) -> Result<(), Error>

Write the entire Bytes at the given position. Read more
§

async fn write_at(&mut self, offset: u64, data: &[u8]) -> Result<(), Error>

Write the entire slice at the given position. Read more
§

async fn sync(&mut self) -> Result<(), Error>

Sync any buffers to the underlying storage.
§

async fn set_len(&mut self, size: u64) -> Result<(), Error>

Set the length of the underlying storage.

§

impl<W, F> Debug for FallibleProgressSliceWriter<W, F>
where W: Debug, - F: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<W, F> Freeze for FallibleProgressSliceWriter<W, F>
where + F: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<W, F> Freeze for FallibleProgressSliceWriter<W, F>
where W: Freeze, F: Freeze,

§

impl<W, F> RefUnwindSafe for FallibleProgressSliceWriter<W, F>
where W: RefUnwindSafe, diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.FlumeProgressSender.html b/pr/2583/docs/iroh/blobs/util/progress/struct.FlumeProgressSender.html index 9c1ade2897..da6559fe09 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.FlumeProgressSender.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.FlumeProgressSender.html @@ -1,21 +1,21 @@ -FlumeProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::FlumeProgressSender

source ·
pub struct FlumeProgressSender<T> { /* private fields */ }
Expand description

A progress sender that uses a flume channel.

-

Implementations§

source§

impl<T> FlumeProgressSender<T>

source

pub fn new(sender: Sender<T>) -> FlumeProgressSender<T>

Create a new progress sender from a flume sender.

-
source

pub fn same_channel(&self, other: &FlumeProgressSender<T>) -> bool

Returns true if other sends on the same flume channel as self.

-

Trait Implementations§

source§

impl<T> Clone for FlumeProgressSender<T>

source§

fn clone(&self) -> FlumeProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for FlumeProgressSender<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> IdGenerator for FlumeProgressSender<T>

source§

fn new_id(&self) -> u64

Get a new unique id
source§

impl<T> ProgressSender for FlumeProgressSender<T>
where - T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
source§

async fn send( +FlumeProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::FlumeProgressSender

pub struct FlumeProgressSender<T> { /* private fields */ }
Expand description

A progress sender that uses a flume channel.

+

Implementations§

§

impl<T> FlumeProgressSender<T>

pub fn new(sender: Sender<T>) -> FlumeProgressSender<T>

Create a new progress sender from a flume sender.

+

pub fn same_channel(&self, other: &FlumeProgressSender<T>) -> bool

Returns true if other sends on the same flume channel as self.

+

Trait Implementations§

§

impl<T> Clone for FlumeProgressSender<T>

§

fn clone(&self) -> FlumeProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for FlumeProgressSender<T>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> IdGenerator for FlumeProgressSender<T>

§

fn new_id(&self) -> u64

Get a new unique id
§

impl<T> ProgressSender for FlumeProgressSender<T>
where + T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
§

async fn send( &self, msg: <FlumeProgressSender<T> as ProgressSender>::Msg -) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
source§

fn try_send( +) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
§

fn try_send( &self, msg: <FlumeProgressSender<T> as ProgressSender>::Msg -) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
source§

fn blocking_send( +) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
§

fn blocking_send( &self, msg: <FlumeProgressSender<T> as ProgressSender>::Msg -) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
source§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>

Send a message and block if the receiver is full. Read more
§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
source§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where + F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
source§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where + F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where Self: IdGenerator,

Create a boxed progress sender to get rid of the concrete type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.IgnoreProgressSender.html b/pr/2583/docs/iroh/blobs/util/progress/struct.IgnoreProgressSender.html index 5d7565ed35..211e70d1f5 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.IgnoreProgressSender.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.IgnoreProgressSender.html @@ -1,10 +1,10 @@ -IgnoreProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::IgnoreProgressSender

source ·
pub struct IgnoreProgressSender<T>(/* private fields */);
Expand description

A no-op progress sender.

-

Trait Implementations§

source§

impl<T> Clone for IgnoreProgressSender<T>

source§

fn clone(&self) -> IgnoreProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for IgnoreProgressSender<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for IgnoreProgressSender<T>

source§

fn default() -> IgnoreProgressSender<T>

Returns the “default value” for a type. Read more
source§

impl<T> IdGenerator for IgnoreProgressSender<T>

source§

fn new_id(&self) -> u64

Get a new unique id
source§

impl<T> ProgressSender for IgnoreProgressSender<T>
where - T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
source§

async fn send(&self, _msg: T) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
source§

fn try_send(&self, _msg: T) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
source§

fn blocking_send(&self, _msg: T) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
source§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where +IgnoreProgressSender in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::IgnoreProgressSender

pub struct IgnoreProgressSender<T>(/* private fields */);
Expand description

A no-op progress sender.

+

Trait Implementations§

§

impl<T> Clone for IgnoreProgressSender<T>

§

fn clone(&self) -> IgnoreProgressSender<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for IgnoreProgressSender<T>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> Default for IgnoreProgressSender<T>

§

fn default() -> IgnoreProgressSender<T>

Returns the “default value” for a type. Read more
§

impl<T> IdGenerator for IgnoreProgressSender<T>

§

fn new_id(&self) -> u64

Get a new unique id
§

impl<T> ProgressSender for IgnoreProgressSender<T>
where + T: Send + Sync + 'static,

§

type Msg = T

The message being sent.
§

async fn send(&self, _msg: T) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
§

fn try_send(&self, _msg: T) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
§

fn blocking_send(&self, _msg: T) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
source§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where + F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
source§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where + F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.
§

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where Self: IdGenerator,

Create a boxed progress sender to get rid of the concrete type.

Auto Trait Implementations§

§

impl<T> Freeze for IgnoreProgressSender<T>

§

impl<T> RefUnwindSafe for IgnoreProgressSender<T>
where T: RefUnwindSafe,

§

impl<T> Send for IgnoreProgressSender<T>
where T: Send,

§

impl<T> Sync for IgnoreProgressSender<T>
where diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.ProgressSliceWriter.html b/pr/2583/docs/iroh/blobs/util/progress/struct.ProgressSliceWriter.html index c63b17a18d..cf92ea5ce7 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.ProgressSliceWriter.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.ProgressSliceWriter.html @@ -1,21 +1,21 @@ -ProgressSliceWriter in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::ProgressSliceWriter

source ·
pub struct ProgressSliceWriter<W, F>(/* private fields */);
Expand description

A slice writer that adds a synchronous progress callback.

+ProgressSliceWriter in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::ProgressSliceWriter

pub struct ProgressSliceWriter<W, F>(/* private fields */);
Expand description

A slice writer that adds a synchronous progress callback.

This wraps any AsyncSliceWriter, passes through all operations to the inner writer, and calls the passed on_write callback whenever data is written.

-

Implementations§

source§

impl<W, F> ProgressSliceWriter<W, F>
where +

Implementations§

§

impl<W, F> ProgressSliceWriter<W, F>
where W: AsyncSliceWriter, - F: FnMut(u64),

source

pub fn new(inner: W, on_write: F) -> ProgressSliceWriter<W, F>

Create a new ProgressSliceWriter from an inner writer and a progress callback

+ F: FnMut(u64),

pub fn new(inner: W, on_write: F) -> ProgressSliceWriter<W, F>

Create a new ProgressSliceWriter from an inner writer and a progress callback

The on_write function is called for each write, with the offset as the first and the length of the data as the second param.

-
source

pub fn into_inner(self) -> W

Return the inner writer

-

Trait Implementations§

source§

impl<W, F> AsyncSliceWriter for ProgressSliceWriter<W, F>
where +

pub fn into_inner(self) -> W

Return the inner writer

+

Trait Implementations§

§

impl<W, F> AsyncSliceWriter for ProgressSliceWriter<W, F>
where W: AsyncSliceWriter + 'static, - F: FnMut(u64, usize) + 'static,

source§

async fn write_bytes_at( + F: FnMut(u64, usize) + 'static,

§

async fn write_bytes_at( &mut self, offset: u64, data: Bytes -) -> Result<(), Error>

Write the entire Bytes at the given position. Read more
source§

async fn write_at(&mut self, offset: u64, data: &[u8]) -> Result<(), Error>

Write the entire slice at the given position. Read more
source§

async fn sync(&mut self) -> Result<(), Error>

Sync any buffers to the underlying storage.
source§

async fn set_len(&mut self, size: u64) -> Result<(), Error>

Set the length of the underlying storage.
source§

impl<W, F> Debug for ProgressSliceWriter<W, F>
where +) -> Result<(), Error>

Write the entire Bytes at the given position. Read more
§

async fn write_at(&mut self, offset: u64, data: &[u8]) -> Result<(), Error>

Write the entire slice at the given position. Read more
§

async fn sync(&mut self) -> Result<(), Error>

Sync any buffers to the underlying storage.
§

async fn set_len(&mut self, size: u64) -> Result<(), Error>

Set the length of the underlying storage.

§

impl<W, F> Debug for ProgressSliceWriter<W, F>
where W: Debug, - F: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<W, F> Freeze for ProgressSliceWriter<W, F>
where + F: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<W, F> Freeze for ProgressSliceWriter<W, F>
where W: Freeze, F: Freeze,

§

impl<W, F> RefUnwindSafe for ProgressSliceWriter<W, F>
where W: RefUnwindSafe, diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.WithFilterMap.html b/pr/2583/docs/iroh/blobs/util/progress/struct.WithFilterMap.html index e28b8485b8..081c41a5b9 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.WithFilterMap.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.WithFilterMap.html @@ -1,18 +1,18 @@ -WithFilterMap in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::WithFilterMap

source ·
pub struct WithFilterMap<I, U, F>(/* private fields */);
Expand description

Transform the message type by filter-mapping to the type of this sender.

+WithFilterMap in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::WithFilterMap

pub struct WithFilterMap<I, U, F>(/* private fields */);
Expand description

Transform the message type by filter-mapping to the type of this sender.

See ProgressSender::with_filter_map.

-

Trait Implementations§

source§

impl<I, U, F> Clone for WithFilterMap<I, U, F>
where +

Trait Implementations§

§

impl<I, U, F> Clone for WithFilterMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

source§

fn clone(&self) -> WithFilterMap<I, U, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I, U, F> Debug for WithFilterMap<I, U, F>
where + F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

§

fn clone(&self) -> WithFilterMap<I, U, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<I, U, F> Debug for WithFilterMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<I, U, F> IdGenerator for WithFilterMap<I, U, F>
where - I: IdGenerator,

source§

fn new_id(&self) -> u64

Get a new unique id
source§

impl<I, U, F> ProgressSender for WithFilterMap<I, U, F>
where + F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<I, U, F> IdGenerator for WithFilterMap<I, U, F>
where + I: IdGenerator,

§

fn new_id(&self) -> u64

Get a new unique id
§

impl<I, U, F> ProgressSender for WithFilterMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

§

type Msg = U

The message being sent.
source§

async fn send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
source§

fn try_send(&self, msg: U) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
source§

fn blocking_send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
source§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where + F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

§

type Msg = U

The message being sent.
§

async fn send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
§

fn try_send(&self, msg: U) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
§

fn blocking_send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
source§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where + F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where U: Send + Sync + 'static, F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.

Auto Trait Implementations§

§

impl<I, U, F> Freeze for WithFilterMap<I, U, F>
where I: Freeze, diff --git a/pr/2583/docs/iroh/blobs/util/progress/struct.WithMap.html b/pr/2583/docs/iroh/blobs/util/progress/struct.WithMap.html index 0a10604766..d8c259d74b 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/struct.WithMap.html +++ b/pr/2583/docs/iroh/blobs/util/progress/struct.WithMap.html @@ -1,24 +1,24 @@ -WithMap in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::WithMap

source ·
pub struct WithMap<I, U, F>(/* private fields */)
+WithMap in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::WithMap

pub struct WithMap<I, U, F>(/* private fields */)
 where
     I: ProgressSender,
     U: Send + Sync + 'static,
     F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static;
Expand description

Transform the message type by mapping to the type of this sender.

See ProgressSender::with_map.

-

Trait Implementations§

source§

impl<I, U, F> Clone for WithMap<I, U, F>
where +

Trait Implementations§

§

impl<I, U, F> Clone for WithMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

source§

fn clone(&self) -> WithMap<I, U, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I, U, F> Debug for WithMap<I, U, F>
where + F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

fn clone(&self) -> WithMap<I, U, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<I, U, F> Debug for WithMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<I, U, F> IdGenerator for WithMap<I, U, F>
where + F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<I, U, F> IdGenerator for WithMap<I, U, F>
where I: IdGenerator + ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

source§

fn new_id(&self) -> u64

Get a new unique id
source§

impl<I, U, F> ProgressSender for WithMap<I, U, F>
where + F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

fn new_id(&self) -> u64

Get a new unique id
§

impl<I, U, F> ProgressSender for WithMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

type Msg = U

The message being sent.
source§

async fn send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
source§

fn try_send(&self, msg: U) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
source§

fn blocking_send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
source§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where + F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

type Msg = U

The message being sent.
§

async fn send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
§

fn try_send(&self, msg: U) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
§

fn blocking_send(&self, msg: U) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full. Read more
§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where U: Send + Sync + 'static, - F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
source§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where + F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.
§

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where U: Send + Sync + 'static, F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.

Auto Trait Implementations§

§

impl<I, U, F> Freeze for WithMap<I, U, F>
where I: Freeze, diff --git a/pr/2583/docs/iroh/blobs/util/progress/trait.IdGenerator.html b/pr/2583/docs/iroh/blobs/util/progress/trait.IdGenerator.html index 83128aa12c..7061156f64 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/trait.IdGenerator.html +++ b/pr/2583/docs/iroh/blobs/util/progress/trait.IdGenerator.html @@ -1,12 +1,12 @@ -IdGenerator in iroh::blobs::util::progress - Rust

Trait iroh::blobs::util::progress::IdGenerator

source ·
pub trait IdGenerator {
+IdGenerator in iroh::blobs::util::progress - Rust

Trait iroh::blobs::util::progress::IdGenerator

pub trait IdGenerator {
     // Required method
     fn new_id(&self) -> u64;
 }
Expand description

An id generator, to be combined with a progress sender.

-

Required Methods§

source

fn new_id(&self) -> u64

Get a new unique id

-

Implementations on Foreign Types§

source§

impl<T> IdGenerator for Arc<dyn BoxableProgressSender<T>>
where - T: Send + Sync + 'static,

source§

fn new_id(&self) -> u64

Implementors§

source§

impl<I, U, F> IdGenerator for WithFilterMap<I, U, F>
where - I: IdGenerator,

source§

impl<I, U, F> IdGenerator for WithMap<I, U, F>
where +

Required Methods§

fn new_id(&self) -> u64

Get a new unique id

+

Implementations on Foreign Types§

§

impl<T> IdGenerator for Arc<dyn BoxableProgressSender<T>>
where + T: Send + Sync + 'static,

§

fn new_id(&self) -> u64

Implementors§

§

impl<I, U, F> IdGenerator for WithFilterMap<I, U, F>
where + I: IdGenerator,

§

impl<I, U, F> IdGenerator for WithMap<I, U, F>
where I: IdGenerator + ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

source§

impl<T> IdGenerator for AsyncChannelProgressSender<T>

source§

impl<T> IdGenerator for BoxedProgressSender<T>
where - T: Send + Sync + 'static,

source§

impl<T> IdGenerator for FlumeProgressSender<T>

source§

impl<T> IdGenerator for IgnoreProgressSender<T>

\ No newline at end of file + F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

impl<T> IdGenerator for AsyncChannelProgressSender<T>

§

impl<T> IdGenerator for BoxedProgressSender<T>
where + T: Send + Sync + 'static,

§

impl<T> IdGenerator for FlumeProgressSender<T>

§

impl<T> IdGenerator for IgnoreProgressSender<T>

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/util/progress/trait.ProgressSender.html b/pr/2583/docs/iroh/blobs/util/progress/trait.ProgressSender.html index c0991fb053..aebc831d36 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/trait.ProgressSender.html +++ b/pr/2583/docs/iroh/blobs/util/progress/trait.ProgressSender.html @@ -1,4 +1,4 @@ -ProgressSender in iroh::blobs::util::progress - Rust

Trait iroh::blobs::util::progress::ProgressSender

source ·
pub trait ProgressSender: Debug + Clone + Send + Sync + 'static {
+ProgressSender in iroh::blobs::util::progress - Rust

Trait iroh::blobs::util::progress::ProgressSender

pub trait ProgressSender: Debug + Clone + Send + Sync + 'static {
     type Msg: Send + Sync + 'static;
 
     // Required methods
@@ -69,46 +69,46 @@ 

Send and Sync bounds. They must also be unencumbered by lifetimes, which is ensured by the 'static bound.

A typical implementation will wrap the sender part of a channel and an id generator.

-

Required Associated Types§

source

type Msg: Send + Sync + 'static

The message being sent.

-

Required Methods§

Required Associated Types§

type Msg: Send + Sync + 'static

The message being sent.

+

Required Methods§

fn send( &self, msg: Self::Msg ) -> impl Future<Output = Result<(), ProgressSendError>> + Send

Send a message and wait if the receiver is full.

Use this to send important progress messages where delivery must be guaranteed.

-
source

fn try_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full.

+

fn try_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full.

Use this to send progress messages where delivery is not important, e.g. a self contained progress message.

-
source

fn blocking_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full.

+

fn blocking_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full.

Use this to send important progress messages where delivery must be guaranteed.

-

Provided Methods§

source

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where +

Provided Methods§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where U: Send + Sync + 'static, F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static,

Transform the message type by mapping to the type of this sender.

-
source

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where +

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where U: Send + Sync + 'static, F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static,

Transform the message type by filter-mapping to the type of this sender.

-
source

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where +

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where Self: IdGenerator,

Create a boxed progress sender to get rid of the concrete type.

-

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> ProgressSender for Option<T>
where - T: ProgressSender,

§

type Msg = <T as ProgressSender>::Msg

source§

async fn send( +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<T> ProgressSender for Option<T>
where + T: ProgressSender,

source§

impl<T> ProgressSender for Arc<dyn BoxableProgressSender<T>>
where - T: Send + Sync + 'static,

§

impl<T> ProgressSender for Arc<dyn BoxableProgressSender<T>>
where + T: Send + Sync + 'static,

§

type Msg = T

§

fn send( &self, msg: T -) -> impl Future<Output = Result<(), ProgressSendError>> + Send

source§

fn try_send(&self, msg: T) -> Result<(), ProgressSendError>

source§

fn blocking_send(&self, msg: T) -> Result<(), ProgressSendError>

Implementors§

source§

impl<I, U, F> ProgressSender for WithFilterMap<I, U, F>
where +) -> impl Future<Output = Result<(), ProgressSendError>> + Send

§

fn try_send(&self, msg: T) -> Result<(), ProgressSendError>

§

fn blocking_send(&self, msg: T) -> Result<(), ProgressSendError>

Implementors§

§

impl<I, U, F> ProgressSender for WithFilterMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

§

type Msg = U

source§

impl<I, U, F> ProgressSender for WithMap<I, U, F>
where + F: Fn(U) -> Option<<I as ProgressSender>::Msg> + Clone + Send + Sync + 'static,

§

type Msg = U

§

impl<I, U, F> ProgressSender for WithMap<I, U, F>
where I: ProgressSender, U: Send + Sync + 'static, - F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

type Msg = U

source§

impl<T> ProgressSender for AsyncChannelProgressSender<T>
where - T: Send + Sync + 'static,

§

type Msg = T

source§

impl<T> ProgressSender for BoxedProgressSender<T>
where - T: Send + Sync + 'static,

§

type Msg = T

source§

impl<T> ProgressSender for FlumeProgressSender<T>
where - T: Send + Sync + 'static,

§

type Msg = T

source§

impl<T> ProgressSender for IgnoreProgressSender<T>
where + F: Fn(U) -> <I as ProgressSender>::Msg + Clone + Send + Sync + 'static,

§

type Msg = U

§

impl<T> ProgressSender for AsyncChannelProgressSender<T>
where + T: Send + Sync + 'static,

§

type Msg = T

§

impl<T> ProgressSender for BoxedProgressSender<T>
where + T: Send + Sync + 'static,

§

type Msg = T

§

impl<T> ProgressSender for FlumeProgressSender<T>
where + T: Send + Sync + 'static,

§

type Msg = T

§

impl<T> ProgressSender for IgnoreProgressSender<T>
where T: Send + Sync + 'static,

§

type Msg = T

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/util/progress/type.ProgressSendResult.html b/pr/2583/docs/iroh/blobs/util/progress/type.ProgressSendResult.html index b8c108c4e0..17facae9b3 100644 --- a/pr/2583/docs/iroh/blobs/util/progress/type.ProgressSendResult.html +++ b/pr/2583/docs/iroh/blobs/util/progress/type.ProgressSendResult.html @@ -1,4 +1,4 @@ -ProgressSendResult in iroh::blobs::util::progress - Rust

Type Alias iroh::blobs::util::progress::ProgressSendResult

source ·
pub type ProgressSendResult<T> = Result<T, ProgressSendError>;
Expand description

A result type for progress sending.

+ProgressSendResult in iroh::blobs::util::progress - Rust

Type Alias iroh::blobs::util::progress::ProgressSendResult

pub type ProgressSendResult<T> = Result<T, ProgressSendError>;
Expand description

A result type for progress sending.

Aliased Type§

enum ProgressSendResult<T> {
     Ok(T),
     Err(ProgressSendError),
diff --git a/pr/2583/docs/iroh/blobs/util/struct.SparseMemFile.html b/pr/2583/docs/iroh/blobs/util/struct.SparseMemFile.html
index 11a2205e09..57afc3567c 100644
--- a/pr/2583/docs/iroh/blobs/util/struct.SparseMemFile.html
+++ b/pr/2583/docs/iroh/blobs/util/struct.SparseMemFile.html
@@ -1,10 +1,10 @@
-SparseMemFile in iroh::blobs::util - Rust

Struct iroh::blobs::util::SparseMemFile

source ·
pub struct SparseMemFile { /* private fields */ }
Expand description

A file that is sparse in memory

+SparseMemFile in iroh::blobs::util - Rust

Struct iroh::blobs::util::SparseMemFile

pub struct SparseMemFile { /* private fields */ }
Expand description

A file that is sparse in memory

It is not actually using sparse storage to make reading faster, so it will not conserve memory. It is just a way to remember the gaps so we can write it to a file in a sparse way later.

-

Implementations§

source§

impl SparseMemFile

source

pub fn new() -> SparseMemFile

Create a new, empty SparseMemFile

-
source

pub fn into_parts(self) -> (Vec<u8>, RangeSet<[usize; 2]>)

Get the data and the valid ranges

-
source

pub fn persist(&self, target: impl WriteAt) -> Result<(), Error>

Persist the SparseMemFile to a WriteAt

+

Implementations§

§

impl SparseMemFile

pub fn new() -> SparseMemFile

Create a new, empty SparseMemFile

+

pub fn into_parts(self) -> (Vec<u8>, RangeSet<[usize; 2]>)

Get the data and the valid ranges

+

pub fn persist(&self, target: impl WriteAt) -> Result<(), Error>

Persist the SparseMemFile to a WriteAt

This will not persist the gaps, only the data that was written.

Methods from Deref<Target = [u8]>§

source

pub fn as_str(&self) -> &str

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a UTF-8 str.

source

pub fn as_bytes(&self) -> &[u8]

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a slice of u8 bytes.

@@ -1110,9 +1110,9 @@
§Examples§Examples
assert_eq!(["hello", "world"].connect(" "), "hello world");
 assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
-

Trait Implementations§

source§

impl AsRef<[u8]> for SparseMemFile

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Debug for SparseMemFile

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for SparseMemFile

source§

fn default() -> SparseMemFile

Returns the “default value” for a type. Read more
source§

impl Deref for SparseMemFile

§

type Target = [u8]

The resulting type after dereferencing.
source§

fn deref(&self) -> &<SparseMemFile as Deref>::Target

Dereferences the value.
source§

impl From<Vec<u8>> for SparseMemFile

source§

fn from(data: Vec<u8>) -> SparseMemFile

Converts to this type from the input type.
source§

impl ReadAt for SparseMemFile

source§

fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<usize, Error>

Reads bytes from an offset in this source into a buffer, returning how -many bytes were read. Read more
source§

fn read_exact_at(&self, pos: u64, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf from an offset. Read more
source§

impl Size for SparseMemFile

source§

fn size(&self) -> Result<Option<u64>, Error>

Get the size of this object, in bytes. Read more
source§

impl TryInto<Vec<u8>> for SparseMemFile

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Vec<u8>, <SparseMemFile as TryInto<Vec<u8>>>::Error>

Performs the conversion.
source§

impl WriteAt for SparseMemFile

source§

fn write_at(&mut self, offset: u64, buf: &[u8]) -> Result<usize, Error>

Writes bytes from a buffer to an offset, returning the number of bytes -written. Read more
source§

fn flush(&mut self) -> Result<(), Error>

Flush this writer, ensuring that any intermediately buffered data +

Trait Implementations§

§

impl AsRef<[u8]> for SparseMemFile

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Debug for SparseMemFile

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for SparseMemFile

§

fn default() -> SparseMemFile

Returns the “default value” for a type. Read more
§

impl Deref for SparseMemFile

§

type Target = [u8]

The resulting type after dereferencing.
§

fn deref(&self) -> &<SparseMemFile as Deref>::Target

Dereferences the value.
§

impl From<Vec<u8>> for SparseMemFile

§

fn from(data: Vec<u8>) -> SparseMemFile

Converts to this type from the input type.
§

impl ReadAt for SparseMemFile

§

fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<usize, Error>

Reads bytes from an offset in this source into a buffer, returning how +many bytes were read. Read more
source§

fn read_exact_at(&self, pos: u64, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf from an offset. Read more
§

impl Size for SparseMemFile

§

fn size(&self) -> Result<Option<u64>, Error>

Get the size of this object, in bytes. Read more
§

impl TryInto<Vec<u8>> for SparseMemFile

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<Vec<u8>, <SparseMemFile as TryInto<Vec<u8>>>::Error>

Performs the conversion.
§

impl WriteAt for SparseMemFile

§

fn write_at(&mut self, offset: u64, buf: &[u8]) -> Result<usize, Error>

Writes bytes from a buffer to an offset, returning the number of bytes +written. Read more
§

fn flush(&mut self) -> Result<(), Error>

Flush this writer, ensuring that any intermediately buffered data reaches its destination. Read more
source§

fn write_all_at(&mut self, pos: u64, buf: &[u8]) -> Result<(), Error>

Writes a complete buffer at an offset. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, diff --git a/pr/2583/docs/iroh/blobs/util/struct.Tag.html b/pr/2583/docs/iroh/blobs/util/struct.Tag.html index 17061bad7e..c6f3490e15 100644 --- a/pr/2583/docs/iroh/blobs/util/struct.Tag.html +++ b/pr/2583/docs/iroh/blobs/util/struct.Tag.html @@ -1,32 +1,32 @@ -Tag in iroh::blobs::util - Rust

Struct iroh::blobs::util::Tag

source ·
pub struct Tag(pub Bytes);
Expand description

A tag

-

Tuple Fields§

§0: Bytes

Implementations§

source§

impl Tag

source

pub fn auto(time: SystemTime, exists: impl Fn(&[u8]) -> bool) -> Tag

Create a new tag that does not exist yet.

-

Trait Implementations§

source§

impl Borrow<[u8]> for Tag

source§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
source§

impl Clone for Tag

source§

fn clone(&self) -> Tag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Tag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Tag

source§

fn deserialize<__D>( +Tag in iroh::blobs::util - Rust

Struct iroh::blobs::util::Tag

pub struct Tag(pub Bytes);
Expand description

A tag

+

Tuple Fields§

§0: Bytes

Implementations§

§

impl Tag

pub fn auto(time: SystemTime, exists: impl Fn(&[u8]) -> bool) -> Tag

Create a new tag that does not exist yet.

+

Trait Implementations§

§

impl Borrow<[u8]> for Tag

§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
§

impl Clone for Tag

§

fn clone(&self) -> Tag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Tag

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Tag

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Tag, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Tag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&str> for Tag

source§

fn from(value: &str) -> Tag

Converts to this type from the input type.
source§

impl From<Bytes> for Tag

source§

fn from(value: Bytes) -> Tag

Converts to this type from the input type.
source§

impl From<String> for Tag

source§

fn from(value: String) -> Tag

Converts to this type from the input type.
source§

impl Key for Tag

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl Ord for Tag

source§

fn cmp(&self, other: &Tag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Tag

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<&str> for Tag

§

fn from(value: &str) -> Tag

Converts to this type from the input type.
§

impl From<Bytes> for Tag

§

fn from(value: Bytes) -> Tag

Converts to this type from the input type.
§

impl From<String> for Tag

§

fn from(value: String) -> Tag

Converts to this type from the input type.
§

impl Key for Tag

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl Ord for Tag

§

fn cmp(&self, other: &Tag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Tag

source§

fn eq(&self, other: &Tag) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Tag

§

fn eq(&self, other: &Tag) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Tag

source§

fn partial_cmp(&self, other: &Tag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Tag

§

fn partial_cmp(&self, other: &Tag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl RedbKey for Tag

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl RedbValue for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as RedbValue>::SelfType<'a>
where +operator. Read more

§

impl RedbKey for Tag

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl RedbValue for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as RedbValue>::SelfType<'a>
where Tag: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <Tag as RedbValue>::SelfType<'b> ) -> <Tag as RedbValue>::AsBytes<'a>
where 'b: 'a, - Tag: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type

source§

impl Serialize for Tag

source§

fn serialize<__S>( + Tag: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type

§

impl Serialize for Tag

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as Value>::SelfType<'a>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for Tag

§

type SelfType<'a> = Tag

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Bytes

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Tag as Value>::SelfType<'a>
where Tag: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <Tag as Value>::SelfType<'b> ) -> <Tag as Value>::AsBytes<'a>
where 'b: 'a, - Tag: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type

source§

impl Eq for Tag

source§

impl StructuralPartialEq for Tag

Auto Trait Implementations§

§

impl !Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnwindSafe for Tag

Blanket Implementations§

source§

impl<T> Any for T
where + Tag: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type

§

impl Eq for Tag

§

impl StructuralPartialEq for Tag

Auto Trait Implementations§

§

impl !Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnwindSafe for Tag

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/struct.TempTag.html b/pr/2583/docs/iroh/blobs/util/struct.TempTag.html index 1f5a076032..eca85b258b 100644 --- a/pr/2583/docs/iroh/blobs/util/struct.TempTag.html +++ b/pr/2583/docs/iroh/blobs/util/struct.TempTag.html @@ -1,16 +1,16 @@ -TempTag in iroh::blobs::util - Rust

Struct iroh::blobs::util::TempTag

source ·
pub struct TempTag { /* private fields */ }
Expand description

A hash and format pair that is protected from garbage collection.

+TempTag in iroh::blobs::util - Rust

Struct iroh::blobs::util::TempTag

pub struct TempTag { /* private fields */ }
Expand description

A hash and format pair that is protected from garbage collection.

If format is raw, this will protect just the blob If format is collection, this will protect the collection and all blobs in it

-

Implementations§

source§

impl TempTag

source

pub fn new(inner: HashAndFormat, on_drop: Option<Weak<dyn TagDrop>>) -> TempTag

Create a new temp tag for the given hash and format

+

Implementations§

§

impl TempTag

pub fn new(inner: HashAndFormat, on_drop: Option<Weak<dyn TagDrop>>) -> TempTag

Create a new temp tag for the given hash and format

This should only be used by store implementations.

The caller is responsible for increasing the refcount on creation and to make sure that temp tags that are created between a mark phase and a sweep phase are protected.

-
source

pub fn inner(&self) -> &HashAndFormat

The hash of the pinned item

-
source

pub fn hash(&self) -> &Hash

The hash of the pinned item

-
source

pub fn format(&self) -> BlobFormat

The format of the pinned item

-
source

pub fn leak(self)

Keep the item alive until the end of the process

-

Trait Implementations§

source§

impl Debug for TempTag

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Drop for TempTag

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

pub fn inner(&self) -> &HashAndFormat

The hash of the pinned item

+

pub fn hash(&self) -> &Hash

The hash of the pinned item

+

pub fn format(&self) -> BlobFormat

The format of the pinned item

+

pub fn leak(self)

Keep the item alive until the end of the process

+

Trait Implementations§

§

impl Debug for TempTag

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Drop for TempTag

§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/blobs/util/trait.TagCounter.html b/pr/2583/docs/iroh/blobs/util/trait.TagCounter.html index f26d9f7288..ebdaef7adb 100644 --- a/pr/2583/docs/iroh/blobs/util/trait.TagCounter.html +++ b/pr/2583/docs/iroh/blobs/util/trait.TagCounter.html @@ -1,4 +1,4 @@ -TagCounter in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagCounter

source ·
pub trait TagCounter: Sized + TagDrop {
+TagCounter in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagCounter

pub trait TagCounter: Sized + TagDrop {
     // Required method
     fn on_create(&self, inner: &HashAndFormat);
 
@@ -11,7 +11,7 @@
 

It is important to include the format in the liveness tracking, since protecting a collection means protecting the blob and all its children, whereas protecting a raw blob only protects the blob itself.

-

Required Methods§

source

fn on_create(&self, inner: &HashAndFormat)

Called on creation of a temp tag

-

Provided Methods§

source

fn as_weak(self: &Arc<Self>) -> Weak<dyn TagDrop>

Get this as a weak reference for use in temp tags

-
source

fn temp_tag(self: &Arc<Self>, inner: HashAndFormat) -> TempTag

Create a new temp tag for the given hash and format

-

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TagCounter for RwLock<TempCounterMap>

source§

fn on_create(&self, content: &HashAndFormat)

Implementors§

\ No newline at end of file +

Required Methods§

fn on_create(&self, inner: &HashAndFormat)

Called on creation of a temp tag

+

Provided Methods§

fn as_weak(self: &Arc<Self>) -> Weak<dyn TagDrop>

Get this as a weak reference for use in temp tags

+

fn temp_tag(self: &Arc<Self>, inner: HashAndFormat) -> TempTag

Create a new temp tag for the given hash and format

+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl TagCounter for RwLock<TempCounterMap>

§

fn on_create(&self, content: &HashAndFormat)

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/blobs/util/trait.TagDrop.html b/pr/2583/docs/iroh/blobs/util/trait.TagDrop.html index 452e85f902..c417b6bb3f 100644 --- a/pr/2583/docs/iroh/blobs/util/trait.TagDrop.html +++ b/pr/2583/docs/iroh/blobs/util/trait.TagDrop.html @@ -1,7 +1,7 @@ -TagDrop in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagDrop

source ·
pub trait TagDrop: Debug + Send + Sync + 'static {
+TagDrop in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagDrop

pub trait TagDrop: Debug + Send + Sync + 'static {
     // Required method
     fn on_drop(&self, inner: &HashAndFormat);
 }
Expand description

Trait used from temp tags to notify an abstract store that a temp tag is being dropped.

-

Required Methods§

source

fn on_drop(&self, inner: &HashAndFormat)

Called on drop

-

Implementations on Foreign Types§

source§

impl TagDrop for RwLock<TempCounterMap>

source§

fn on_drop(&self, content: &HashAndFormat)

Implementors§

\ No newline at end of file +

Required Methods§

fn on_drop(&self, inner: &HashAndFormat)

Called on drop

+

Implementations on Foreign Types§

§

impl TagDrop for RwLock<TempCounterMap>

§

fn on_drop(&self, content: &HashAndFormat)

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/client/gossip/enum.SubscribeResponse.html b/pr/2583/docs/iroh/client/gossip/enum.SubscribeResponse.html index 1b3422bca3..ef19fb02a7 100644 --- a/pr/2583/docs/iroh/client/gossip/enum.SubscribeResponse.html +++ b/pr/2583/docs/iroh/client/gossip/enum.SubscribeResponse.html @@ -1,13 +1,13 @@ -SubscribeResponse in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeResponse

source ·
pub enum SubscribeResponse {
+SubscribeResponse in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeResponse

pub enum SubscribeResponse {
     Gossip(GossipEvent),
     Lagged,
 }
Expand description

Update from a subscribed gossip topic

Variants§

§

Gossip(GossipEvent)

A message was received

§

Lagged

We missed some messages

-

Trait Implementations§

source§

impl Debug for Event

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Event

Trait Implementations§

§

impl Debug for Event

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Event

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Event, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Event

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for Event

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/client/gossip/enum.SubscribeUpdate.html b/pr/2583/docs/iroh/client/gossip/enum.SubscribeUpdate.html index d0c0753586..3986c6581c 100644 --- a/pr/2583/docs/iroh/client/gossip/enum.SubscribeUpdate.html +++ b/pr/2583/docs/iroh/client/gossip/enum.SubscribeUpdate.html @@ -1,13 +1,13 @@ -SubscribeUpdate in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeUpdate

source ·
pub enum SubscribeUpdate {
+SubscribeUpdate in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeUpdate

pub enum SubscribeUpdate {
     Broadcast(Bytes),
     BroadcastNeighbors(Bytes),
 }
Expand description

Send a gossip message

Variants§

§

Broadcast(Bytes)

Broadcast a message to all nodes in the swarm

§

BroadcastNeighbors(Bytes)

Broadcast a message to all direct neighbors

-

Trait Implementations§

source§

impl Debug for Command

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Command

Trait Implementations§

§

impl Debug for Command

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Command

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Command, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Command

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for Command

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/docs/metrics/struct.Metrics.html b/pr/2583/docs/iroh/docs/metrics/struct.Metrics.html index 3cebcff7cf..15ea533441 100644 --- a/pr/2583/docs/iroh/docs/metrics/struct.Metrics.html +++ b/pr/2583/docs/iroh/docs/metrics/struct.Metrics.html @@ -1,27 +1,27 @@ Metrics in iroh::docs::metrics - Rust

Struct iroh::docs::metrics::Metrics

source ·
pub struct Metrics {
Show 19 fields - pub new_entries_local: Counter, - pub new_entries_remote: Counter, - pub new_entries_local_size: Counter, - pub new_entries_remote_size: Counter, - pub sync_via_connect_success: Counter, - pub sync_via_connect_failure: Counter, - pub sync_via_accept_success: Counter, - pub sync_via_accept_failure: Counter, - pub actor_tick_main: Counter, - pub doc_gossip_tick_main: Counter, - pub doc_gossip_tick_event: Counter, - pub doc_gossip_tick_actor: Counter, - pub doc_gossip_tick_pending_join: Counter, - pub doc_live_tick_main: Counter, - pub doc_live_tick_actor: Counter, - pub doc_live_tick_replica_event: Counter, - pub doc_live_tick_running_sync_connect: Counter, - pub doc_live_tick_running_sync_accept: Counter, - pub doc_live_tick_pending_downloads: Counter, + pub new_entries_local: Counter, + pub new_entries_remote: Counter, + pub new_entries_local_size: Counter, + pub new_entries_remote_size: Counter, + pub sync_via_connect_success: Counter, + pub sync_via_connect_failure: Counter, + pub sync_via_accept_success: Counter, + pub sync_via_accept_failure: Counter, + pub actor_tick_main: Counter, + pub doc_gossip_tick_main: Counter, + pub doc_gossip_tick_event: Counter, + pub doc_gossip_tick_actor: Counter, + pub doc_gossip_tick_pending_join: Counter, + pub doc_live_tick_main: Counter, + pub doc_live_tick_actor: Counter, + pub doc_live_tick_replica_event: Counter, + pub doc_live_tick_running_sync_connect: Counter, + pub doc_live_tick_running_sync_accept: Counter, + pub doc_live_tick_pending_downloads: Counter,
}
Expand description

Metrics for iroh-docs

-

Fields§

§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/docs/struct.AuthorId.html b/pr/2583/docs/iroh/docs/struct.AuthorId.html index 2d6a83fae2..04570eee4b 100644 --- a/pr/2583/docs/iroh/docs/struct.AuthorId.html +++ b/pr/2583/docs/iroh/docs/struct.AuthorId.html @@ -162,7 +162,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/docs/struct.AuthorPublicKey.html b/pr/2583/docs/iroh/docs/struct.AuthorPublicKey.html index 6110bd7795..f4c8399945 100644 --- a/pr/2583/docs/iroh/docs/struct.AuthorPublicKey.html +++ b/pr/2583/docs/iroh/docs/struct.AuthorPublicKey.html @@ -154,7 +154,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/docs/struct.DocTicket.html b/pr/2583/docs/iroh/docs/struct.DocTicket.html index 46221a64a3..31092fea8f 100644 --- a/pr/2583/docs/iroh/docs/struct.DocTicket.html +++ b/pr/2583/docs/iroh/docs/struct.DocTicket.html @@ -12,7 +12,7 @@ &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Ticket for DocTicket

source§

const KIND: &'static str = "doc"

String prefix describing the kind of iroh ticket. Read more
source§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
source§

fn from_bytes(bytes: &[u8]) -> Result<DocTicket, Error>

Deserialize from the base32 string representation bytes.
source§

fn serialize(&self) -> String

Serialize to string.
source§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Ticket for DocTicket

source§

const KIND: &'static str = "doc"

String prefix describing the kind of iroh ticket. Read more
source§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
source§

fn from_bytes(bytes: &[u8]) -> Result<DocTicket, Error>

Deserialize from the base32 string representation bytes.
§

fn serialize(&self) -> String

Serialize to string.
§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/docs/struct.NamespaceId.html b/pr/2583/docs/iroh/docs/struct.NamespaceId.html index df3c34f1ea..1e1c9b466a 100644 --- a/pr/2583/docs/iroh/docs/struct.NamespaceId.html +++ b/pr/2583/docs/iroh/docs/struct.NamespaceId.html @@ -162,7 +162,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/docs/struct.NamespacePublicKey.html b/pr/2583/docs/iroh/docs/struct.NamespacePublicKey.html index b86233ac1a..c47b3a1143 100644 --- a/pr/2583/docs/iroh/docs/struct.NamespacePublicKey.html +++ b/pr/2583/docs/iroh/docs/struct.NamespacePublicKey.html @@ -153,7 +153,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/gossip/dispatcher/enum.Command.html b/pr/2583/docs/iroh/gossip/dispatcher/enum.Command.html index fec2e4b9b2..3eca4d62f6 100644 --- a/pr/2583/docs/iroh/gossip/dispatcher/enum.Command.html +++ b/pr/2583/docs/iroh/gossip/dispatcher/enum.Command.html @@ -1,13 +1,13 @@ -Command in iroh::gossip::dispatcher - Rust

Enum iroh::gossip::dispatcher::Command

source ·
pub enum Command {
+Command in iroh::gossip::dispatcher - Rust

Enum iroh::gossip::dispatcher::Command

pub enum Command {
     Broadcast(Bytes),
     BroadcastNeighbors(Bytes),
 }
Expand description

Send a gossip message

Variants§

§

Broadcast(Bytes)

Broadcast a message to all nodes in the swarm

§

BroadcastNeighbors(Bytes)

Broadcast a message to all direct neighbors

-

Trait Implementations§

source§

impl Debug for Command

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Command

Trait Implementations§

§

impl Debug for Command

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Command

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Command, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Command

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for Command

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/gossip/dispatcher/enum.Event.html b/pr/2583/docs/iroh/gossip/dispatcher/enum.Event.html index 1f8dadfead..99c8f3fb12 100644 --- a/pr/2583/docs/iroh/gossip/dispatcher/enum.Event.html +++ b/pr/2583/docs/iroh/gossip/dispatcher/enum.Event.html @@ -1,13 +1,13 @@ -Event in iroh::gossip::dispatcher - Rust

Enum iroh::gossip::dispatcher::Event

source ·
pub enum Event {
+Event in iroh::gossip::dispatcher - Rust

Enum iroh::gossip::dispatcher::Event

pub enum Event {
     Gossip(GossipEvent),
     Lagged,
 }
Expand description

Update from a subscribed gossip topic

Variants§

§

Gossip(GossipEvent)

A message was received

§

Lagged

We missed some messages

-

Trait Implementations§

source§

impl Debug for Event

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Event

Trait Implementations§

§

impl Debug for Event

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Event

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Event, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Event

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for Event

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/gossip/dispatcher/enum.GossipEvent.html b/pr/2583/docs/iroh/gossip/dispatcher/enum.GossipEvent.html index 53af1637bd..a8da6b2cc2 100644 --- a/pr/2583/docs/iroh/gossip/dispatcher/enum.GossipEvent.html +++ b/pr/2583/docs/iroh/gossip/dispatcher/enum.GossipEvent.html @@ -1,4 +1,4 @@ -GossipEvent in iroh::gossip::dispatcher - Rust

Enum iroh::gossip::dispatcher::GossipEvent

source ·
pub enum GossipEvent {
+GossipEvent in iroh::gossip::dispatcher - Rust

Enum iroh::gossip::dispatcher::GossipEvent

pub enum GossipEvent {
     NeighborUp(PublicKey),
     NeighborDown(PublicKey),
     Received(Message),
@@ -7,21 +7,21 @@
 

Variants§

§

NeighborUp(PublicKey)

We have a new, direct neighbor in the swarm membership layer for this topic

§

NeighborDown(PublicKey)

We dropped direct neighbor in the swarm membership layer for this topic

§

Received(Message)

A gossip message was received for this topic

-

Trait Implementations§

source§

impl Clone for GossipEvent

source§

fn clone(&self) -> GossipEvent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GossipEvent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GossipEvent

Trait Implementations§

§

impl Clone for GossipEvent

§

fn clone(&self) -> GossipEvent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for GossipEvent

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for GossipEvent

§

fn deserialize<__D>( __deserializer: __D ) -> Result<GossipEvent, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
source§

impl Ord for GossipEvent

source§

fn cmp(&self, other: &GossipEvent) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<Event<PublicKey>> for GossipEvent

§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
§

impl Ord for GossipEvent

§

fn cmp(&self, other: &GossipEvent) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for GossipEvent

source§

fn eq(&self, other: &GossipEvent) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
§

impl PartialEq for GossipEvent

§

fn eq(&self, other: &GossipEvent) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for GossipEvent

source§

fn partial_cmp(&self, other: &GossipEvent) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for GossipEvent

§

fn partial_cmp(&self, other: &GossipEvent) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for GossipEvent

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for GossipEvent

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GossipEvent

source§

impl StructuralPartialEq for GossipEvent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for GossipEvent

§

impl StructuralPartialEq for GossipEvent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/dispatcher/index.html b/pr/2583/docs/iroh/gossip/dispatcher/index.html index c1d9021545..5d3d49b5cf 100644 --- a/pr/2583/docs/iroh/gossip/dispatcher/index.html +++ b/pr/2583/docs/iroh/gossip/dispatcher/index.html @@ -1,3 +1,3 @@ -iroh::gossip::dispatcher - Rust

Module iroh::gossip::dispatcher

source ·
Expand description

A higher level wrapper for the gossip engine that manages multiple gossip subscriptions and updates.

+iroh::gossip::dispatcher - Rust

Module iroh::gossip::dispatcher

Expand description

A higher level wrapper for the gossip engine that manages multiple gossip subscriptions and updates.

Structs§

Enums§

  • Send a gossip message
  • Update from a subscribed gossip topic
  • Gossip event An event to be emitted to the application for a particular topic.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/dispatcher/struct.GossipDispatcher.html b/pr/2583/docs/iroh/gossip/dispatcher/struct.GossipDispatcher.html index 36bd216401..9cb8cb0684 100644 --- a/pr/2583/docs/iroh/gossip/dispatcher/struct.GossipDispatcher.html +++ b/pr/2583/docs/iroh/gossip/dispatcher/struct.GossipDispatcher.html @@ -1,12 +1,12 @@ -GossipDispatcher in iroh::gossip::dispatcher - Rust

Struct iroh::gossip::dispatcher::GossipDispatcher

source ·
pub struct GossipDispatcher { /* private fields */ }
Expand description

A gossip engine that manages gossip subscriptions and updates.

-

Implementations§

source§

impl GossipDispatcher

source

pub fn new(gossip: Gossip) -> GossipDispatcher

Create a new gossip dispatcher with the given gossip instance.

-
source

pub fn subscribe_with_opts( +GossipDispatcher in iroh::gossip::dispatcher - Rust

Struct iroh::gossip::dispatcher::GossipDispatcher

pub struct GossipDispatcher { /* private fields */ }
Expand description

A gossip engine that manages gossip subscriptions and updates.

+

Implementations§

§

impl GossipDispatcher

pub fn new(gossip: Gossip) -> GossipDispatcher

Create a new gossip dispatcher with the given gossip instance.

+

pub fn subscribe_with_opts( &self, topic: TopicId, options: SubscribeOptions, updates: Box<dyn Stream<Item = Command> + Send + Sync + Unpin> ) -> impl Stream<Item = Result<Event, RpcError>> + Unpin

Subscribe to a gossip topic.

-

Trait Implementations§

source§

impl Clone for GossipDispatcher

source§

fn clone(&self) -> GossipDispatcher

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GossipDispatcher

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for GossipDispatcher

§

fn clone(&self) -> GossipDispatcher

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for GossipDispatcher

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/dispatcher/struct.Message.html b/pr/2583/docs/iroh/gossip/dispatcher/struct.Message.html index ed4bed86d6..0fa8164d84 100644 --- a/pr/2583/docs/iroh/gossip/dispatcher/struct.Message.html +++ b/pr/2583/docs/iroh/gossip/dispatcher/struct.Message.html @@ -1,4 +1,4 @@ -Message in iroh::gossip::dispatcher - Rust

Struct iroh::gossip::dispatcher::Message

source ·
pub struct Message {
+Message in iroh::gossip::dispatcher - Rust

Struct iroh::gossip::dispatcher::Message

pub struct Message {
     pub content: Bytes,
     pub scope: DeliveryScope,
     pub delivered_from: PublicKey,
@@ -7,21 +7,21 @@
 
§scope: DeliveryScope

The scope of the message. This tells us if the message is from a direct neighbor or actual gossip.

§delivered_from: PublicKey

The node that delivered the message. This is not the same as the original author.

-

Trait Implementations§

source§

impl Clone for Message

source§

fn clone(&self) -> Message

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Message

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Message

Trait Implementations§

§

impl Clone for Message

§

fn clone(&self) -> Message

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Message

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Message

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Message, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Ord for Message

source§

fn cmp(&self, other: &Message) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Ord for Message

§

fn cmp(&self, other: &Message) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Message

source§

fn eq(&self, other: &Message) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Message

§

fn eq(&self, other: &Message) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Message

source§

fn partial_cmp(&self, other: &Message) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Message

§

fn partial_cmp(&self, other: &Message) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for Message

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Message

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Message

source§

impl StructuralPartialEq for Message

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

§

impl Eq for Message

§

impl StructuralPartialEq for Message

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/dispatcher/struct.SubscribeOptions.html b/pr/2583/docs/iroh/gossip/dispatcher/struct.SubscribeOptions.html index ca4339c111..d2016a2527 100644 --- a/pr/2583/docs/iroh/gossip/dispatcher/struct.SubscribeOptions.html +++ b/pr/2583/docs/iroh/gossip/dispatcher/struct.SubscribeOptions.html @@ -1,4 +1,4 @@ -SubscribeOptions in iroh::gossip::dispatcher - Rust

Struct iroh::gossip::dispatcher::SubscribeOptions

source ·
pub struct SubscribeOptions {
+SubscribeOptions in iroh::gossip::dispatcher - Rust

Struct iroh::gossip::dispatcher::SubscribeOptions

pub struct SubscribeOptions {
     pub bootstrap: BTreeSet<PublicKey>,
     pub subscription_capacity: usize,
 }
Expand description

Join a gossip topic

@@ -8,10 +8,10 @@ the message will be dropped, and the subscriber will be closed.

This is to prevent a single slow subscriber from blocking the dispatch loop. If a subscriber is lagging, it should be closed and re-opened.

-

Trait Implementations§

source§

impl Debug for SubscribeOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SubscribeOptions

Trait Implementations§

§

impl Debug for SubscribeOptions

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SubscribeOptions

§

fn deserialize<__D>( __deserializer: __D ) -> Result<SubscribeOptions, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for SubscribeOptions

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for SubscribeOptions

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/gossip/index.html b/pr/2583/docs/iroh/gossip/index.html index 5f5e9af329..0b922508d3 100644 --- a/pr/2583/docs/iroh/gossip/index.html +++ b/pr/2583/docs/iroh/gossip/index.html @@ -1,2 +1,2 @@ -iroh::gossip - Rust

Crate iroh::gossip

source ·
Expand description

Broadcast messages to peers subscribed to a topic

+iroh::gossip - Rust

Crate iroh::gossip

Expand description

Broadcast messages to peers subscribed to a topic

Modules§

  • A higher level wrapper for the gossip engine that manages multiple gossip subscriptions and updates.
  • Metrics for iroh-gossip
  • Networking for the iroh-gossip protocol
  • Implementation of the iroh-gossip protocol, as an IO-less state machine
\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/metrics/index.html b/pr/2583/docs/iroh/gossip/metrics/index.html index b44a5e59f6..1fa193111a 100644 --- a/pr/2583/docs/iroh/gossip/metrics/index.html +++ b/pr/2583/docs/iroh/gossip/metrics/index.html @@ -1,2 +1,2 @@ -iroh::gossip::metrics - Rust

Module iroh::gossip::metrics

source ·
Expand description

Metrics for iroh-gossip

+iroh::gossip::metrics - Rust

Module iroh::gossip::metrics

Expand description

Metrics for iroh-gossip

Structs§

  • Enum of metrics for the module
\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/metrics/struct.Metrics.html b/pr/2583/docs/iroh/gossip/metrics/struct.Metrics.html index 9114c65b17..263310318a 100644 --- a/pr/2583/docs/iroh/gossip/metrics/struct.Metrics.html +++ b/pr/2583/docs/iroh/gossip/metrics/struct.Metrics.html @@ -1,26 +1,26 @@ -Metrics in iroh::gossip::metrics - Rust

Struct iroh::gossip::metrics::Metrics

source ·
pub struct Metrics {
Show 18 fields - pub msgs_ctrl_sent: Counter, - pub msgs_ctrl_recv: Counter, - pub msgs_data_sent: Counter, - pub msgs_data_recv: Counter, - pub msgs_data_sent_size: Counter, - pub msgs_data_recv_size: Counter, - pub msgs_ctrl_sent_size: Counter, - pub msgs_ctrl_recv_size: Counter, - pub neighbor_up: Counter, - pub neighbor_down: Counter, - pub actor_tick_main: Counter, - pub actor_tick_rx: Counter, - pub actor_tick_endpoint: Counter, - pub actor_tick_dialer: Counter, - pub actor_tick_dialer_success: Counter, - pub actor_tick_dialer_failure: Counter, - pub actor_tick_in_event_rx: Counter, - pub actor_tick_timers: Counter, +Metrics in iroh::gossip::metrics - Rust

Struct iroh::gossip::metrics::Metrics

pub struct Metrics {
Show 18 fields + pub msgs_ctrl_sent: Counter, + pub msgs_ctrl_recv: Counter, + pub msgs_data_sent: Counter, + pub msgs_data_recv: Counter, + pub msgs_data_sent_size: Counter, + pub msgs_data_recv_size: Counter, + pub msgs_ctrl_sent_size: Counter, + pub msgs_ctrl_recv_size: Counter, + pub neighbor_up: Counter, + pub neighbor_down: Counter, + pub actor_tick_main: Counter, + pub actor_tick_rx: Counter, + pub actor_tick_endpoint: Counter, + pub actor_tick_dialer: Counter, + pub actor_tick_dialer_success: Counter, + pub actor_tick_dialer_failure: Counter, + pub actor_tick_in_event_rx: Counter, + pub actor_tick_timers: Counter,
}
Expand description

Enum of metrics for the module

-

Fields§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

§

impl Clone for Metrics

§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Metrics

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Metrics

§

fn default() -> Metrics

Returns the “default value” for a type. Read more
§

impl Iterable for Metrics

§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
§

impl Metric for Metrics

§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html b/pr/2583/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html index 4263896d99..95f2c71300 100644 --- a/pr/2583/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html +++ b/pr/2583/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html @@ -1,2 +1,2 @@ -GOSSIP_ALPN in iroh::gossip::net - Rust

Constant iroh::gossip::net::GOSSIP_ALPN

source ·
pub const GOSSIP_ALPN: &'static [u8];
Expand description

ALPN protocol name

+GOSSIP_ALPN in iroh::gossip::net - Rust

Constant iroh::gossip::net::GOSSIP_ALPN

pub const GOSSIP_ALPN: &'static [u8];
Expand description

ALPN protocol name

\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/net/index.html b/pr/2583/docs/iroh/gossip/net/index.html index 5d87ec5cf9..00082a5390 100644 --- a/pr/2583/docs/iroh/gossip/net/index.html +++ b/pr/2583/docs/iroh/gossip/net/index.html @@ -1,2 +1,2 @@ -iroh::gossip::net - Rust

Module iroh::gossip::net

source ·
Expand description

Networking for the iroh-gossip protocol

+iroh::gossip::net - Rust

Module iroh::gossip::net

Expand description

Networking for the iroh-gossip protocol

Modules§

  • Utilities for iroh-gossip networking

Structs§

  • Publish and subscribe on gossiping topics.
  • Future that completes once at least one peer is joined for this topic.

Constants§

Type Aliases§

  • Commands for the gossip protocol
  • Events emitted from the gossip protocol
\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/net/struct.Gossip.html b/pr/2583/docs/iroh/gossip/net/struct.Gossip.html index f92fb5427b..f0aaec8355 100644 --- a/pr/2583/docs/iroh/gossip/net/struct.Gossip.html +++ b/pr/2583/docs/iroh/gossip/net/struct.Gossip.html @@ -1,4 +1,4 @@ -Gossip in iroh::gossip::net - Rust

Struct iroh::gossip::net::Gossip

source ·
pub struct Gossip { /* private fields */ }
Expand description

Publish and subscribe on gossiping topics.

+Gossip in iroh::gossip::net - Rust

Struct iroh::gossip::net::Gossip

pub struct Gossip { /* private fields */ }
Expand description

Publish and subscribe on gossiping topics.

Each topic is a separate broadcast tree with separate memberships.

A topic has to be joined before you can publish or subscribe on the topic. To join the swarm for a topic, you have to know the PublicKey of at least one peer that also joined the topic.

@@ -10,13 +10,13 @@ connections, and if the ALPN protocol equals GOSSIP_ALPN, forward the connection to the gossip actor through Self::handle_connection.

The gossip actor will, however, initiate new connections to other peers by itself.

-

Implementations§

source§

impl Gossip

Implementations§

§

impl Gossip

pub fn from_endpoint( endpoint: Endpoint, config: Config, my_addr: &AddrInfo ) -> Gossip

Spawn a gossip actor and get a handle for it

-
source

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

-
source

pub async fn join( +

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

+

pub async fn join( &self, topic: TopicId, peers: Vec<PublicKey> @@ -30,10 +30,10 @@

The JoinTopicFut has no timeout, so it will remain pending indefinitely if no peer could be contacted. Usually you will want to add a timeout yourself.

TODO: Resolve to an error once all connection attempts failed.

-

source

pub async fn quit(&self, topic: TopicId) -> Result<(), Error>

Quit a topic.

+

pub async fn quit(&self, topic: TopicId) -> Result<(), Error>

Quit a topic.

This sends a disconnect message to all active peers and then drops the state for this topic.

-
source

pub async fn broadcast( +

pub async fn broadcast( &self, topic: TopicId, message: Bytes @@ -41,31 +41,31 @@

This does not join the topic automatically, so you have to call Self::join yourself for messages to be broadcast to peers.

Messages with the same content are only delivered once.

-

source

pub async fn broadcast_neighbors( +

pub async fn broadcast_neighbors( &self, topic: TopicId, message: Bytes ) -> Result<(), Error>

Broadcast a message on a topic to the immediate neighbors.

This does not join the topic automatically, so you have to call Self::join yourself for messages to be broadcast to peers.

-
source

pub async fn subscribe( +

pub async fn subscribe( &self, topic: TopicId ) -> Result<Receiver<Event<PublicKey>>, Error>

Subscribe to messages and event notifications for a topic.

Does not join the topic automatically, so you have to call Self::join yourself to actually receive messages.

-
source

pub fn subscribe_all( +

pub fn subscribe_all( self ) -> impl Stream<Item = Result<(TopicId, Event<PublicKey>), RecvError>>

Subscribe to all events published on topics that you joined.

Note that this method takes self by value. Usually you would clone the Gossip handle. before.

-
source

pub async fn handle_connection(&self, conn: Connection) -> Result<(), Error>

Handle an incoming Connection.

+

pub async fn handle_connection(&self, conn: Connection) -> Result<(), Error>

Handle an incoming Connection.

Make sure to check the ALPN protocol yourself before passing the connection.

-
source

pub fn update_direct_addresses(&self, addrs: &[DirectAddr]) -> Result<(), Error>

Set info on our direct addresses.

+

pub fn update_direct_addresses(&self, addrs: &[DirectAddr]) -> Result<(), Error>

Set info on our direct addresses.

This will be sent to peers on Neighbor and Join requests so that they can connect directly to us.

This is only best effort, and will drop new events if backed up.

-

Trait Implementations§

source§

impl Clone for Gossip

source§

fn clone(&self) -> Gossip

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Gossip

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl ProtocolHandler for Gossip

source§

fn accept(self: Arc<Self>, conn: Connecting) -> BoxedFuture<Result<()>>

Handle an incoming connection. Read more
source§

fn shutdown(self: Arc<Self>) -> BoxedFuture<()>

Called when the node shuts down.

Auto Trait Implementations§

§

impl Freeze for Gossip

§

impl !RefUnwindSafe for Gossip

§

impl Send for Gossip

§

impl Sync for Gossip

§

impl Unpin for Gossip

§

impl !UnwindSafe for Gossip

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Gossip

§

fn clone(&self) -> Gossip

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Gossip

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl ProtocolHandler for Gossip

source§

fn accept(self: Arc<Self>, conn: Connecting) -> BoxedFuture<Result<()>>

Handle an incoming connection. Read more
source§

fn shutdown(self: Arc<Self>) -> BoxedFuture<()>

Called when the node shuts down.

Auto Trait Implementations§

§

impl Freeze for Gossip

§

impl !RefUnwindSafe for Gossip

§

impl Send for Gossip

§

impl Sync for Gossip

§

impl Unpin for Gossip

§

impl !UnwindSafe for Gossip

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/net/struct.JoinTopicFut.html b/pr/2583/docs/iroh/gossip/net/struct.JoinTopicFut.html index 4fe193f485..56c1377a44 100644 --- a/pr/2583/docs/iroh/gossip/net/struct.JoinTopicFut.html +++ b/pr/2583/docs/iroh/gossip/net/struct.JoinTopicFut.html @@ -1,8 +1,8 @@ -JoinTopicFut in iroh::gossip::net - Rust

Struct iroh::gossip::net::JoinTopicFut

source ·
pub struct JoinTopicFut(/* private fields */);
Expand description

Future that completes once at least one peer is joined for this topic.

+JoinTopicFut in iroh::gossip::net - Rust

Struct iroh::gossip::net::JoinTopicFut

pub struct JoinTopicFut(/* private fields */);
Expand description

Future that completes once at least one peer is joined for this topic.

The future has no timeout, so it will remain pending indefinitely if no peer could be contacted. Usually you will want to add a timeout yourself.

TODO: Optionally resolve to an error once all connection attempts failed.

-

Trait Implementations§

source§

impl Debug for JoinTopicFut

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Future for JoinTopicFut

§

type Output = Result<TopicId, Error>

The type of value produced on completion.
source§

fn poll( +

Trait Implementations§

§

impl Debug for JoinTopicFut

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Future for JoinTopicFut

§

type Output = Result<TopicId, Error>

The type of value produced on completion.
§

fn poll( self: Pin<&mut JoinTopicFut>, cx: &mut Context<'_> ) -> Poll<<JoinTopicFut as Future>::Output>

Attempt to resolve the future to a final value, registering diff --git a/pr/2583/docs/iroh/gossip/net/type.Command.html b/pr/2583/docs/iroh/gossip/net/type.Command.html index 88d3c1f55b..3eb3c31876 100644 --- a/pr/2583/docs/iroh/gossip/net/type.Command.html +++ b/pr/2583/docs/iroh/gossip/net/type.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::Command

source ·
pub type Command = Command<PublicKey>;
Expand description

Commands for the gossip protocol

+Command in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::Command

pub type Command = Command<PublicKey>;
Expand description

Commands for the gossip protocol

Aliased Type§

enum Command {
     Join(Vec<PublicKey>),
     Broadcast(Bytes, Scope),
diff --git a/pr/2583/docs/iroh/gossip/net/type.Event.html b/pr/2583/docs/iroh/gossip/net/type.Event.html
index a4e42c0596..c9f15015d4 100644
--- a/pr/2583/docs/iroh/gossip/net/type.Event.html
+++ b/pr/2583/docs/iroh/gossip/net/type.Event.html
@@ -1,4 +1,4 @@
-Event in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::Event

source ·
pub type Event = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

+Event in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::Event

pub type Event = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

Aliased Type§

enum Event {
     NeighborUp(PublicKey),
     NeighborDown(PublicKey),
diff --git a/pr/2583/docs/iroh/gossip/net/util/fn.read_lp.html b/pr/2583/docs/iroh/gossip/net/util/fn.read_lp.html
index 14153630c1..e3fb5e43be 100644
--- a/pr/2583/docs/iroh/gossip/net/util/fn.read_lp.html
+++ b/pr/2583/docs/iroh/gossip/net/util/fn.read_lp.html
@@ -1,4 +1,4 @@
-read_lp in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_lp

source ·
pub async fn read_lp(
+read_lp in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_lp

pub async fn read_lp(
     reader: impl AsyncRead + Unpin,
     buffer: &mut BytesMut,
     max_message_size: usize
diff --git a/pr/2583/docs/iroh/gossip/net/util/fn.read_message.html b/pr/2583/docs/iroh/gossip/net/util/fn.read_message.html
index 2a46a719b4..0aa6d93b84 100644
--- a/pr/2583/docs/iroh/gossip/net/util/fn.read_message.html
+++ b/pr/2583/docs/iroh/gossip/net/util/fn.read_message.html
@@ -1,4 +1,4 @@
-read_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_message

source ·
pub async fn read_message(
+read_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_message

pub async fn read_message(
     reader: impl AsyncRead + Unpin,
     buffer: &mut BytesMut,
     max_message_size: usize
diff --git a/pr/2583/docs/iroh/gossip/net/util/fn.write_message.html b/pr/2583/docs/iroh/gossip/net/util/fn.write_message.html
index 7e564830dc..aeafbc8275 100644
--- a/pr/2583/docs/iroh/gossip/net/util/fn.write_message.html
+++ b/pr/2583/docs/iroh/gossip/net/util/fn.write_message.html
@@ -1,4 +1,4 @@
-write_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::write_message

source ·
pub async fn write_message<W>(
+write_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::write_message

pub async fn write_message<W>(
     writer: &mut W,
     buffer: &mut BytesMut,
     frame: &Message<PublicKey>,
diff --git a/pr/2583/docs/iroh/gossip/net/util/index.html b/pr/2583/docs/iroh/gossip/net/util/index.html
index bb0556e777..471167a041 100644
--- a/pr/2583/docs/iroh/gossip/net/util/index.html
+++ b/pr/2583/docs/iroh/gossip/net/util/index.html
@@ -1,2 +1,2 @@
-iroh::gossip::net::util - Rust

Module iroh::gossip::net::util

source ·
Expand description

Utilities for iroh-gossip networking

+iroh::gossip::net::util - Rust

Module iroh::gossip::net::util

Expand description

Utilities for iroh-gossip networking

Structs§

  • A TimerMap with an async method to wait for the next timer expiration.

Functions§

  • Reads a length prefixed message.
  • Read a length-prefixed message and decode as ProtoMessage;
  • Write a ProtoMessage as a length-prefixed, postcard-encoded message.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/net/util/struct.Timers.html b/pr/2583/docs/iroh/gossip/net/util/struct.Timers.html index 51d1f5908a..78cd204bb5 100644 --- a/pr/2583/docs/iroh/gossip/net/util/struct.Timers.html +++ b/pr/2583/docs/iroh/gossip/net/util/struct.Timers.html @@ -1,13 +1,13 @@ -Timers in iroh::gossip::net::util - Rust

Struct iroh::gossip::net::util::Timers

source ·
pub struct Timers<T> { /* private fields */ }
Expand description

A TimerMap with an async method to wait for the next timer expiration.

-

Implementations§

source§

impl<T> Timers<T>

source

pub fn new() -> Timers<T>

Create a new timer map

-
source

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant

-
source

pub async fn wait_and_drain(&mut self) -> impl Iterator<Item = (Instant, T)>

Wait for the next timer to expire and return an iterator of all expired timers

+Timers in iroh::gossip::net::util - Rust

Struct iroh::gossip::net::util::Timers

pub struct Timers<T> { /* private fields */ }
Expand description

A TimerMap with an async method to wait for the next timer expiration.

+

Implementations§

§

impl<T> Timers<T>

pub fn new() -> Timers<T>

Create a new timer map

+

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant

+

pub async fn wait_and_drain(&mut self) -> impl Iterator<Item = (Instant, T)>

Wait for the next timer to expire and return an iterator of all expired timers

If the TimerMap is empty, this will return a future that is pending forever. After inserting a new entry, prior futures returned from this method will not become ready. They should be dropped after calling Self::insert, and a new future as returned from this method should be awaited instead.

-

Trait Implementations§

source§

impl<T> Debug for Timers<T>
where - T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for Timers<T>

source§

fn default() -> Timers<T>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Timers<T>

§

impl<T> !RefUnwindSafe for Timers<T>

§

impl<T> Send for Timers<T>
where +

Trait Implementations§

§

impl<T> Debug for Timers<T>
where + T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> Default for Timers<T>

§

fn default() -> Timers<T>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Timers<T>

§

impl<T> !RefUnwindSafe for Timers<T>

§

impl<T> Send for Timers<T>
where T: Send,

§

impl<T> Sync for Timers<T>
where T: Sync,

§

impl<T> Unpin for Timers<T>

§

impl<T> !UnwindSafe for Timers<T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/enum.Command.html b/pr/2583/docs/iroh/gossip/proto/enum.Command.html index cea8a147df..c6b7f29447 100644 --- a/pr/2583/docs/iroh/gossip/proto/enum.Command.html +++ b/pr/2583/docs/iroh/gossip/proto/enum.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Command

source ·
pub enum Command<PI> {
+Command in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Command

pub enum Command<PI> {
     Join(Vec<PI>),
     Broadcast(Bytes, Scope),
     Quit,
@@ -8,9 +8,9 @@
 but only become operational after the first join request by another peer.

§

Broadcast(Bytes, Scope)

Broadcast a message for this topic.

§

Quit

Leave this topic and drop all state.

-

Trait Implementations§

source§

impl<PI> Clone for Command<PI>
where - PI: Clone,

source§

fn clone(&self) -> Command<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Command<PI>
where - Vec<PI>: Debug,

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Command<PI>
where + PI: Clone,

§

fn clone(&self) -> Command<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Command<PI>
where + Vec<PI>: Debug,

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Command<PI>
where PI: Send,

§

impl<PI> Sync for Command<PI>
where PI: Sync,

§

impl<PI> Unpin for Command<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/enum.DeliveryScope.html b/pr/2583/docs/iroh/gossip/proto/enum.DeliveryScope.html index 26aa2e01f8..c13fd7f777 100644 --- a/pr/2583/docs/iroh/gossip/proto/enum.DeliveryScope.html +++ b/pr/2583/docs/iroh/gossip/proto/enum.DeliveryScope.html @@ -1,4 +1,4 @@ -DeliveryScope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::DeliveryScope

source ·
pub enum DeliveryScope {
+DeliveryScope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::DeliveryScope

pub enum DeliveryScope {
     Swarm(Round),
     Neighbors,
 }
Expand description

The scope to deliver the message to.

@@ -6,22 +6,22 @@ original broadcaster.

§

Neighbors

This message was received from a direct neighbor that broadcasted the message to neighbors only.

-

Implementations§

source§

impl DeliveryScope

source

pub fn is_direct(&self) -> bool

Whether this message was directly received from its publisher.

-

Trait Implementations§

source§

impl Clone for DeliveryScope

source§

fn clone(&self) -> DeliveryScope

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DeliveryScope

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for DeliveryScope

Implementations§

§

impl DeliveryScope

pub fn is_direct(&self) -> bool

Whether this message was directly received from its publisher.

+

Trait Implementations§

§

impl Clone for DeliveryScope

§

fn clone(&self) -> DeliveryScope

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for DeliveryScope

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for DeliveryScope

§

fn deserialize<__D>( __deserializer: __D ) -> Result<DeliveryScope, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Ord for DeliveryScope

source§

fn cmp(&self, other: &DeliveryScope) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Ord for DeliveryScope

§

fn cmp(&self, other: &DeliveryScope) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for DeliveryScope

source§

fn eq(&self, other: &DeliveryScope) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for DeliveryScope

§

fn eq(&self, other: &DeliveryScope) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for DeliveryScope

source§

fn partial_cmp(&self, other: &DeliveryScope) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for DeliveryScope

§

fn partial_cmp(&self, other: &DeliveryScope) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for DeliveryScope

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for DeliveryScope

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for DeliveryScope

source§

impl Eq for DeliveryScope

source§

impl StructuralPartialEq for DeliveryScope

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for DeliveryScope

§

impl Eq for DeliveryScope

§

impl StructuralPartialEq for DeliveryScope

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/enum.Event.html b/pr/2583/docs/iroh/gossip/proto/enum.Event.html index 4841b69f94..ffa6a11fd4 100644 --- a/pr/2583/docs/iroh/gossip/proto/enum.Event.html +++ b/pr/2583/docs/iroh/gossip/proto/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Event

source ·
pub enum Event<PI> {
+Event in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Event

pub enum Event<PI> {
     NeighborUp(PI),
     NeighborDown(PI),
     Received(GossipEvent<PI>),
@@ -6,29 +6,29 @@
 

Variants§

§

NeighborUp(PI)

We have a new, direct neighbor in the swarm membership layer for this topic

§

NeighborDown(PI)

We dropped direct neighbor in the swarm membership layer for this topic

§

Received(GossipEvent<PI>)

A gossip message was received for this topic

-

Trait Implementations§

source§

impl<PI> Clone for Event<PI>
where - PI: Clone,

source§

fn clone(&self) -> Event<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Event<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de, PI> Deserialize<'de> for Event<PI>
where - PI: Deserialize<'de>,

Trait Implementations§

§

impl<PI> Clone for Event<PI>
where + PI: Clone,

§

fn clone(&self) -> Event<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Event<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Event<PI>
where + PI: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Event<PI>, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
source§

impl<PI> Ord for Event<PI>
where - PI: Ord,

source§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl From<Event<PublicKey>> for GossipEvent

§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
§

impl<PI> Ord for Event<PI>
where + PI: Ord,

§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<PI> PartialEq for Event<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl<PI> PartialEq for Event<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<PI> PartialOrd for Event<PI>
where - PI: PartialOrd,

source§

fn partial_cmp(&self, other: &Event<PI>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl<PI> PartialOrd for Event<PI>
where + PI: PartialOrd,

§

fn partial_cmp(&self, other: &Event<PI>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl<PI> Serialize for Event<PI>
where - PI: Serialize,

source§

fn serialize<__S>( +operator. Read more

§

impl<PI> Serialize for Event<PI>
where + PI: Serialize,

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<PI> Eq for Event<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<PI> Eq for Event<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Event<PI>
where PI: Send,

§

impl<PI> Sync for Event<PI>
where PI: Sync,

§

impl<PI> Unpin for Event<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/enum.InEvent.html b/pr/2583/docs/iroh/gossip/proto/enum.InEvent.html index a9c3eddf0c..d7dfd6ba20 100644 --- a/pr/2583/docs/iroh/gossip/proto/enum.InEvent.html +++ b/pr/2583/docs/iroh/gossip/proto/enum.InEvent.html @@ -1,4 +1,4 @@ -InEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::InEvent

source ·
pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::InEvent

pub enum InEvent<PI> {
     RecvMessage(PI, Message<PI>),
     Command(TopicId, Command<PI>),
     TimerExpired(Timer<PI>),
@@ -10,9 +10,9 @@
 
§

TimerExpired(Timer<PI>)

Trigger a previously scheduled timer.

§

PeerDisconnected(PI)

Peer disconnected on the network level.

§

UpdatePeerData(PeerData)

Update the opaque peer data about yourself.

-

Trait Implementations§

source§

impl<PI> Clone for InEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> InEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for InEvent<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for InEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> InEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for InEvent<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for InEvent<PI>
where PI: Send,

§

impl<PI> Sync for InEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for InEvent<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/enum.OutEvent.html b/pr/2583/docs/iroh/gossip/proto/enum.OutEvent.html index d5c503cdc1..bc371125c1 100644 --- a/pr/2583/docs/iroh/gossip/proto/enum.OutEvent.html +++ b/pr/2583/docs/iroh/gossip/proto/enum.OutEvent.html @@ -1,4 +1,4 @@ -OutEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::OutEvent

source ·
pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::OutEvent

pub enum OutEvent<PI> {
     SendMessage(PI, Message<PI>),
     EmitEvent(TopicId, Event<PI>),
     ScheduleTimer(Duration, Timer<PI>),
@@ -11,9 +11,9 @@
 after the duration.

§

DisconnectPeer(PI)

Close the connection to a peer on the network level.

§

PeerData(PI, PeerData)

Updated peer data

-

Trait Implementations§

source§

impl<PI> Clone for OutEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> OutEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for OutEvent<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for OutEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> OutEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for OutEvent<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for OutEvent<PI>
where PI: Send,

§

impl<PI> Sync for OutEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for OutEvent<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/enum.Scope.html b/pr/2583/docs/iroh/gossip/proto/enum.Scope.html index 30a349826e..e8bf9dc51b 100644 --- a/pr/2583/docs/iroh/gossip/proto/enum.Scope.html +++ b/pr/2583/docs/iroh/gossip/proto/enum.Scope.html @@ -1,24 +1,24 @@ -Scope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Scope

source ·
pub enum Scope {
+Scope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Scope

pub enum Scope {
     Swarm,
     Neighbors,
 }
Expand description

The broadcast scope of a gossip message.

Variants§

§

Swarm

The message is broadcast to all peers in the swarm.

§

Neighbors

The message is broadcast only to the immediate neighbors of a peer.

-

Trait Implementations§

source§

impl Clone for Scope

source§

fn clone(&self) -> Scope

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Scope

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Scope

Trait Implementations§

§

impl Clone for Scope

§

fn clone(&self) -> Scope

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Scope

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Scope

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Scope, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Ord for Scope

source§

fn cmp(&self, other: &Scope) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Ord for Scope

§

fn cmp(&self, other: &Scope) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Scope

source§

fn eq(&self, other: &Scope) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Scope

§

fn eq(&self, other: &Scope) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Scope

source§

fn partial_cmp(&self, other: &Scope) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Scope

§

fn partial_cmp(&self, other: &Scope) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for Scope

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Scope

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Scope

source§

impl Eq for Scope

source§

impl StructuralPartialEq for Scope

Auto Trait Implementations§

§

impl Freeze for Scope

§

impl RefUnwindSafe for Scope

§

impl Send for Scope

§

impl Sync for Scope

§

impl Unpin for Scope

§

impl UnwindSafe for Scope

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for Scope

§

impl Eq for Scope

§

impl StructuralPartialEq for Scope

Auto Trait Implementations§

§

impl Freeze for Scope

§

impl RefUnwindSafe for Scope

§

impl Send for Scope

§

impl Sync for Scope

§

impl Unpin for Scope

§

impl UnwindSafe for Scope

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/index.html b/pr/2583/docs/iroh/gossip/proto/index.html index a7ee04a557..dcb3231ecb 100644 --- a/pr/2583/docs/iroh/gossip/proto/index.html +++ b/pr/2583/docs/iroh/gossip/proto/index.html @@ -1,4 +1,4 @@ -iroh::gossip::proto - Rust

Module iroh::gossip::proto

source ·
Expand description

Implementation of the iroh-gossip protocol, as an IO-less state machine

+iroh::gossip::proto - Rust

Module iroh::gossip::proto

Expand description

Implementation of the iroh-gossip protocol, as an IO-less state machine

This module implements the iroh-gossip protocol. The entry point is State, which contains the protocol state for a node.

The iroh-gossip protocol is made up from two parts: A swarm membership protocol, based on diff --git a/pr/2583/docs/iroh/gossip/proto/state/enum.InEvent.html b/pr/2583/docs/iroh/gossip/proto/state/enum.InEvent.html index ea8193d531..f510b37891 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/enum.InEvent.html +++ b/pr/2583/docs/iroh/gossip/proto/state/enum.InEvent.html @@ -1,4 +1,4 @@ -InEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::InEvent

source ·
pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::InEvent

pub enum InEvent<PI> {
     RecvMessage(PI, Message<PI>),
     Command(TopicId, Command<PI>),
     TimerExpired(Timer<PI>),
@@ -10,9 +10,9 @@
 
§

TimerExpired(Timer<PI>)

Trigger a previously scheduled timer.

§

PeerDisconnected(PI)

Peer disconnected on the network level.

§

UpdatePeerData(PeerData)

Update the opaque peer data about yourself.

-

Trait Implementations§

source§

impl<PI> Clone for InEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> InEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for InEvent<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for InEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> InEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for InEvent<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for InEvent<PI>
where PI: Send,

§

impl<PI> Sync for InEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for InEvent<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/state/enum.MessageKind.html b/pr/2583/docs/iroh/gossip/proto/state/enum.MessageKind.html index 066321e702..df2eb0b3ac 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/enum.MessageKind.html +++ b/pr/2583/docs/iroh/gossip/proto/state/enum.MessageKind.html @@ -1,10 +1,10 @@ -MessageKind in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::MessageKind

source ·
pub enum MessageKind {
+MessageKind in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::MessageKind

pub enum MessageKind {
     Data,
     Control,
 }
Expand description

Whether this is a control or data message

Variants§

§

Data

A data message.

§

Control

A control message.

-

Trait Implementations§

source§

impl Debug for MessageKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for MessageKind

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/state/enum.OutEvent.html b/pr/2583/docs/iroh/gossip/proto/state/enum.OutEvent.html index 86dcaca7ca..33fe63c7dc 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/enum.OutEvent.html +++ b/pr/2583/docs/iroh/gossip/proto/state/enum.OutEvent.html @@ -1,4 +1,4 @@ -OutEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::OutEvent

source ·
pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::OutEvent

pub enum OutEvent<PI> {
     SendMessage(PI, Message<PI>),
     EmitEvent(TopicId, Event<PI>),
     ScheduleTimer(Duration, Timer<PI>),
@@ -11,9 +11,9 @@
 after the duration.

§

DisconnectPeer(PI)

Close the connection to a peer on the network level.

§

PeerData(PI, PeerData)

Updated peer data

-

Trait Implementations§

source§

impl<PI> Clone for OutEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> OutEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for OutEvent<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for OutEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> OutEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for OutEvent<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for OutEvent<PI>
where PI: Send,

§

impl<PI> Sync for OutEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for OutEvent<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/state/index.html b/pr/2583/docs/iroh/gossip/proto/state/index.html index bb8b66a068..40bd403366 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/index.html +++ b/pr/2583/docs/iroh/gossip/proto/state/index.html @@ -1,2 +1,2 @@ -iroh::gossip::proto::state - Rust

Module iroh::gossip::proto::state

source ·
Expand description

The protocol state of the iroh-gossip protocol.

+iroh::gossip::proto::state - Rust

Module iroh::gossip::proto::state

Expand description

The protocol state of the iroh-gossip protocol.

Structs§

  • Protocol wire message
  • The state of the iroh-gossip protocol.
  • A timer to be registered into the runtime
  • The identifier for a topic

Enums§

  • Input event to the protocol state.
  • Whether this is a control or data message
  • Output event from the protocol state.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/proto/state/struct.Message.html b/pr/2583/docs/iroh/gossip/proto/state/struct.Message.html index a863ea4f60..6c5a8c7050 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/struct.Message.html +++ b/pr/2583/docs/iroh/gossip/proto/state/struct.Message.html @@ -1,16 +1,16 @@ -Message in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Message

source ·
pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

+Message in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Message

pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

This is the wire frame of the iroh-gossip protocol.

-

Implementations§

source§

impl<PI> Message<PI>

source

pub fn kind(&self) -> MessageKind

Get the kind of this message

-
source§

impl<PI> Message<PI>
where - PI: Serialize,

source

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

-

Trait Implementations§

source§

impl<PI> Clone for Message<PI>
where - PI: Clone,

source§

fn clone(&self) -> Message<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Message<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de, PI> Deserialize<'de> for Message<PI>
where - PI: Deserialize<'de>,

Implementations§

§

impl<PI> Message<PI>

pub fn kind(&self) -> MessageKind

Get the kind of this message

+
§

impl<PI> Message<PI>
where + PI: Serialize,

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

+

Trait Implementations§

§

impl<PI> Clone for Message<PI>
where + PI: Clone,

§

fn clone(&self) -> Message<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Message<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Message<PI>
where + PI: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Message<PI>, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<PI> Serialize for Message<PI>
where - PI: Serialize,

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl<PI> Serialize for Message<PI>
where + PI: Serialize,

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/gossip/proto/state/struct.State.html b/pr/2583/docs/iroh/gossip/proto/state/struct.State.html index 77ac608aa8..9bc7fa6d35 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/struct.State.html +++ b/pr/2583/docs/iroh/gossip/proto/state/struct.State.html @@ -1,31 +1,31 @@ -State in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::State

source ·
pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

+State in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::State

pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

The implementation works as an IO-less state machine. The implementer injects events through Self::handle, which returns an iterator of OutEvents to be processed.

This struct contains a map of topic::State for each topic that was joined. It mostly acts as a forwarder of InEvents to matching topic state. Each topic’s state is completely independent; thus the actual protocol logic lives with topic::State.

-

Implementations§

source§

impl<PI, R> State<PI, R>
where +

Implementations§

§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng + Clone,

source

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

+ R: Rng + Clone,

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

me is the PeerIdentity of the local node, peer_data is the initial PeerData (which can be updated over time). For the protocol to perform as recommended in the papers, the Config should be identical for all nodes in the network.

-
source

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

-
source

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

-
source

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

-
source

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

-
source

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

-
source

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

-
source

pub fn handle( +

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

+

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

+

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

+

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

+

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

+

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

+

pub fn handle( &mut self, event: InEvent<PI>, now: Instant ) -> impl Iterator<Item = OutEvent<PI>>

Handle an InEvent

This returns an iterator of OutEvents that must be processed.

-

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where +

Trait Implementations§

§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - R: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>
where + R: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2583/docs/iroh/gossip/proto/state/struct.Timer.html b/pr/2583/docs/iroh/gossip/proto/state/struct.Timer.html index b6396da619..2d8ba63ed5 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/struct.Timer.html +++ b/pr/2583/docs/iroh/gossip/proto/state/struct.Timer.html @@ -1,11 +1,11 @@ -Timer in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Timer

source ·
pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

+Timer in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Timer

pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

As the implementation of the protocol is an IO-less state machine, registering timers does not happen within the protocol implementation. Instead, these Timer structs are emitted as OutEvents. The implementer must register the timer in its runtime to be emitted on the specified Instant, and once triggered inject an InEvent::TimerExpired into the protocol state.

-

Trait Implementations§

source§

impl<PI> Clone for Timer<PI>
where - PI: Clone,

source§

fn clone(&self) -> Timer<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Timer<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Timer<PI>
where + PI: Clone,

§

fn clone(&self) -> Timer<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Timer<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where PI: Freeze,

§

impl<PI> RefUnwindSafe for Timer<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Timer<PI>
where PI: Send,

§

impl<PI> Sync for Timer<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/state/struct.TopicId.html b/pr/2583/docs/iroh/gossip/proto/state/struct.TopicId.html index ca758b2651..5cf0ae8b27 100644 --- a/pr/2583/docs/iroh/gossip/proto/state/struct.TopicId.html +++ b/pr/2583/docs/iroh/gossip/proto/state/struct.TopicId.html @@ -1,25 +1,25 @@ -TopicId in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::TopicId

source ·
pub struct TopicId(/* private fields */);
Expand description

The identifier for a topic

-

Implementations§

source§

impl TopicId

source

pub const fn from_bytes(bytes: [u8; 32]) -> TopicId

Create from a byte array.

-
source

pub fn as_bytes(&self) -> &[u8; 32]

Get as byte slice.

-

Trait Implementations§

source§

impl AsRef<[u8]> for TopicId

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<[u8; 32]> for TopicId

source§

fn as_ref(&self) -> &[u8; 32]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for TopicId

source§

fn clone(&self) -> TopicId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TopicId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TopicId

source§

fn deserialize<__D>( +TopicId in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::TopicId

pub struct TopicId(/* private fields */);
Expand description

The identifier for a topic

+

Implementations§

§

impl TopicId

pub const fn from_bytes(bytes: [u8; 32]) -> TopicId

Create from a byte array.

+

pub fn as_bytes(&self) -> &[u8; 32]

Get as byte slice.

+

Trait Implementations§

§

impl AsRef<[u8]> for TopicId

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl AsRef<[u8; 32]> for TopicId

§

fn as_ref(&self) -> &[u8; 32]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Clone for TopicId

§

fn clone(&self) -> TopicId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for TopicId

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for TopicId

§

fn deserialize<__D>( __deserializer: __D ) -> Result<TopicId, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for TopicId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> From<T> for TopicId
where - T: Into<[u8; 32]>,

source§

fn from(value: T) -> TopicId

Converts to this type from the input type.
source§

impl FromStr for TopicId

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<TopicId, <TopicId as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for TopicId

source§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for TopicId

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> From<T> for TopicId
where + T: Into<[u8; 32]>,

§

fn from(value: T) -> TopicId

Converts to this type from the input type.
§

impl FromStr for TopicId

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<TopicId, <TopicId as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for TopicId

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for TopicId

source§

fn cmp(&self, other: &TopicId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for TopicId

§

fn cmp(&self, other: &TopicId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TopicId

source§

fn eq(&self, other: &TopicId) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for TopicId

§

fn eq(&self, other: &TopicId) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TopicId

source§

fn partial_cmp(&self, other: &TopicId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for TopicId

§

fn partial_cmp(&self, other: &TopicId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for TopicId

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for TopicId

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TopicId

source§

impl Eq for TopicId

source§

impl StructuralPartialEq for TopicId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for TopicId

§

impl Eq for TopicId

§

impl StructuralPartialEq for TopicId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where @@ -154,7 +154,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/struct.Config.html b/pr/2583/docs/iroh/gossip/proto/struct.Config.html index 1bdd3214b8..d3bd6505ca 100644 --- a/pr/2583/docs/iroh/gossip/proto/struct.Config.html +++ b/pr/2583/docs/iroh/gossip/proto/struct.Config.html @@ -1,4 +1,4 @@ -Config in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Config

source ·
pub struct Config {
+Config in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Config

pub struct Config {
     pub membership: Config,
     pub broadcast: Config,
     pub max_message_size: usize,
@@ -9,7 +9,7 @@
 

This size should be the same across a network to ensure all nodes can transmit and read large messages.

At minimum, this size should be large enough to send gossip control messages. This can vary, depending on the size of the PeerIdentity you use and the size of the PeerData you transmit in your messages.

The default is DEFAULT_MAX_MESSAGE_SIZE.

-

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Config

source§

fn default() -> Config

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Config

§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Config

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Config

§

fn default() -> Config

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/struct.Message.html b/pr/2583/docs/iroh/gossip/proto/struct.Message.html index dd8f428983..e9af38960b 100644 --- a/pr/2583/docs/iroh/gossip/proto/struct.Message.html +++ b/pr/2583/docs/iroh/gossip/proto/struct.Message.html @@ -1,16 +1,16 @@ -Message in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Message

source ·
pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

+Message in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Message

pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

This is the wire frame of the iroh-gossip protocol.

-

Implementations§

source§

impl<PI> Message<PI>

source

pub fn kind(&self) -> MessageKind

Get the kind of this message

-
source§

impl<PI> Message<PI>
where - PI: Serialize,

source

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

-

Trait Implementations§

source§

impl<PI> Clone for Message<PI>
where - PI: Clone,

source§

fn clone(&self) -> Message<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Message<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de, PI> Deserialize<'de> for Message<PI>
where - PI: Deserialize<'de>,

Implementations§

§

impl<PI> Message<PI>

pub fn kind(&self) -> MessageKind

Get the kind of this message

+
§

impl<PI> Message<PI>
where + PI: Serialize,

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

+

Trait Implementations§

§

impl<PI> Clone for Message<PI>
where + PI: Clone,

§

fn clone(&self) -> Message<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Message<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Message<PI>
where + PI: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Message<PI>, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<PI> Serialize for Message<PI>
where - PI: Serialize,

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<PI> Serialize for Message<PI>
where + PI: Serialize,

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2583/docs/iroh/gossip/proto/struct.PeerData.html b/pr/2583/docs/iroh/gossip/proto/struct.PeerData.html index 9cb90d0f4c..89f2fdc905 100644 --- a/pr/2583/docs/iroh/gossip/proto/struct.PeerData.html +++ b/pr/2583/docs/iroh/gossip/proto/struct.PeerData.html @@ -1,19 +1,19 @@ -PeerData in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::PeerData

source ·
pub struct PeerData(/* private fields */);
Expand description

Opaque binary data that is transmitted on messages that introduce new peers.

+PeerData in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::PeerData

pub struct PeerData(/* private fields */);
Expand description

Opaque binary data that is transmitted on messages that introduce new peers.

Implementations may use these bytes to supply addresses or other information needed to connect to a peer that is not included in the peer’s PeerIdentity.

-

Implementations§

source§

impl PeerData

source

pub fn new(data: impl Into<Bytes>) -> PeerData

Create a new PeerData from a byte buffer.

-
source

pub fn inner(&self) -> &Bytes

Get a reference to the contained [bytes::Bytes].

-
source

pub fn as_bytes(&self) -> &[u8]

Get the peer data as a byte slice.

-

Trait Implementations§

source§

impl Clone for PeerData

source§

fn clone(&self) -> PeerData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerData

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for PeerData

source§

fn default() -> PeerData

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerData

Implementations§

§

impl PeerData

pub fn new(data: impl Into<Bytes>) -> PeerData

Create a new PeerData from a byte buffer.

+

pub fn inner(&self) -> &Bytes

Get a reference to the contained [bytes::Bytes].

+

pub fn as_bytes(&self) -> &[u8]

Get the peer data as a byte slice.

+

Trait Implementations§

§

impl Clone for PeerData

§

fn clone(&self) -> PeerData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for PeerData

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for PeerData

§

fn default() -> PeerData

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for PeerData

§

fn deserialize<__D>( __deserializer: __D ) -> Result<PeerData, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for PeerData

source§

fn eq(&self, other: &PeerData) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl PartialEq for PeerData

§

fn eq(&self, other: &PeerData) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PeerData

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for PeerData

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PeerData

source§

impl StructuralPartialEq for PeerData

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for PeerData

§

impl StructuralPartialEq for PeerData

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/struct.State.html b/pr/2583/docs/iroh/gossip/proto/struct.State.html index ae2e988c0d..a945bf4d8e 100644 --- a/pr/2583/docs/iroh/gossip/proto/struct.State.html +++ b/pr/2583/docs/iroh/gossip/proto/struct.State.html @@ -1,31 +1,31 @@ -State in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::State

source ·
pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

+State in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::State

pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

The implementation works as an IO-less state machine. The implementer injects events through Self::handle, which returns an iterator of OutEvents to be processed.

This struct contains a map of topic::State for each topic that was joined. It mostly acts as a forwarder of InEvents to matching topic state. Each topic’s state is completely independent; thus the actual protocol logic lives with topic::State.

-

Implementations§

source§

impl<PI, R> State<PI, R>
where +

Implementations§

§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng + Clone,

source

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

+ R: Rng + Clone,

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

me is the PeerIdentity of the local node, peer_data is the initial PeerData (which can be updated over time). For the protocol to perform as recommended in the papers, the Config should be identical for all nodes in the network.

-
source

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

-
source

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

-
source

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

-
source

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

-
source

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

-
source

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

-
source

pub fn handle( +

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

+

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

+

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

+

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

+

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

+

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

+

pub fn handle( &mut self, event: InEvent<PI>, now: Instant ) -> impl Iterator<Item = OutEvent<PI>>

Handle an InEvent

This returns an iterator of OutEvents that must be processed.

-

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where +

Trait Implementations§

§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - R: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>
where + R: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2583/docs/iroh/gossip/proto/struct.Timer.html b/pr/2583/docs/iroh/gossip/proto/struct.Timer.html index e55ca7967b..3509b25eca 100644 --- a/pr/2583/docs/iroh/gossip/proto/struct.Timer.html +++ b/pr/2583/docs/iroh/gossip/proto/struct.Timer.html @@ -1,11 +1,11 @@ -Timer in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Timer

source ·
pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

+Timer in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Timer

pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

As the implementation of the protocol is an IO-less state machine, registering timers does not happen within the protocol implementation. Instead, these Timer structs are emitted as OutEvents. The implementer must register the timer in its runtime to be emitted on the specified Instant, and once triggered inject an InEvent::TimerExpired into the protocol state.

-

Trait Implementations§

source§

impl<PI> Clone for Timer<PI>
where - PI: Clone,

source§

fn clone(&self) -> Timer<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Timer<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Timer<PI>
where + PI: Clone,

§

fn clone(&self) -> Timer<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Timer<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where PI: Freeze,

§

impl<PI> RefUnwindSafe for Timer<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Timer<PI>
where PI: Send,

§

impl<PI> Sync for Timer<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/struct.TopicId.html b/pr/2583/docs/iroh/gossip/proto/struct.TopicId.html index 9d6cba392c..4682076c25 100644 --- a/pr/2583/docs/iroh/gossip/proto/struct.TopicId.html +++ b/pr/2583/docs/iroh/gossip/proto/struct.TopicId.html @@ -1,25 +1,25 @@ -TopicId in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::TopicId

source ·
pub struct TopicId(/* private fields */);
Expand description

The identifier for a topic

-

Implementations§

source§

impl TopicId

source

pub const fn from_bytes(bytes: [u8; 32]) -> TopicId

Create from a byte array.

-
source

pub fn as_bytes(&self) -> &[u8; 32]

Get as byte slice.

-

Trait Implementations§

source§

impl AsRef<[u8]> for TopicId

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<[u8; 32]> for TopicId

source§

fn as_ref(&self) -> &[u8; 32]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for TopicId

source§

fn clone(&self) -> TopicId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TopicId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TopicId

source§

fn deserialize<__D>( +TopicId in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::TopicId

pub struct TopicId(/* private fields */);
Expand description

The identifier for a topic

+

Implementations§

§

impl TopicId

pub const fn from_bytes(bytes: [u8; 32]) -> TopicId

Create from a byte array.

+

pub fn as_bytes(&self) -> &[u8; 32]

Get as byte slice.

+

Trait Implementations§

§

impl AsRef<[u8]> for TopicId

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl AsRef<[u8; 32]> for TopicId

§

fn as_ref(&self) -> &[u8; 32]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Clone for TopicId

§

fn clone(&self) -> TopicId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for TopicId

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for TopicId

§

fn deserialize<__D>( __deserializer: __D ) -> Result<TopicId, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for TopicId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> From<T> for TopicId
where - T: Into<[u8; 32]>,

source§

fn from(value: T) -> TopicId

Converts to this type from the input type.
source§

impl FromStr for TopicId

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<TopicId, <TopicId as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for TopicId

source§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for TopicId

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> From<T> for TopicId
where + T: Into<[u8; 32]>,

§

fn from(value: T) -> TopicId

Converts to this type from the input type.
§

impl FromStr for TopicId

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<TopicId, <TopicId as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for TopicId

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for TopicId

source§

fn cmp(&self, other: &TopicId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for TopicId

§

fn cmp(&self, other: &TopicId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TopicId

source§

fn eq(&self, other: &TopicId) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for TopicId

§

fn eq(&self, other: &TopicId) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TopicId

source§

fn partial_cmp(&self, other: &TopicId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for TopicId

§

fn partial_cmp(&self, other: &TopicId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for TopicId

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for TopicId

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TopicId

source§

impl Eq for TopicId

source§

impl StructuralPartialEq for TopicId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for TopicId

§

impl Eq for TopicId

§

impl StructuralPartialEq for TopicId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where @@ -154,7 +154,7 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html b/pr/2583/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html index bdf19a0d37..60ca6d0c98 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html @@ -1,3 +1,3 @@ -DEFAULT_MAX_MESSAGE_SIZE in iroh::gossip::proto::topic - Rust

Constant iroh::gossip::proto::topic::DEFAULT_MAX_MESSAGE_SIZE

source ·
pub const DEFAULT_MAX_MESSAGE_SIZE: usize = 4096; // 4_096usize
Expand description

The default maximum size in bytes for a gossip message. +DEFAULT_MAX_MESSAGE_SIZE in iroh::gossip::proto::topic - Rust

Constant iroh::gossip::proto::topic::DEFAULT_MAX_MESSAGE_SIZE

pub const DEFAULT_MAX_MESSAGE_SIZE: usize = 4096; // 4_096usize
Expand description

The default maximum size in bytes for a gossip message. This is a sane but arbitrary default and can be changed in the Config.

\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/proto/topic/enum.Command.html b/pr/2583/docs/iroh/gossip/proto/topic/enum.Command.html index 42200d71db..145e7f5440 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/enum.Command.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/enum.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Command

source ·
pub enum Command<PI> {
+Command in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Command

pub enum Command<PI> {
     Join(Vec<PI>),
     Broadcast(Bytes, Scope),
     Quit,
@@ -8,9 +8,9 @@
 but only become operational after the first join request by another peer.

§

Broadcast(Bytes, Scope)

Broadcast a message for this topic.

§

Quit

Leave this topic and drop all state.

-

Trait Implementations§

source§

impl<PI> Clone for Command<PI>
where - PI: Clone,

source§

fn clone(&self) -> Command<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Command<PI>
where - Vec<PI>: Debug,

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Command<PI>
where + PI: Clone,

§

fn clone(&self) -> Command<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Command<PI>
where + Vec<PI>: Debug,

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Command<PI>
where PI: Send,

§

impl<PI> Sync for Command<PI>
where PI: Sync,

§

impl<PI> Unpin for Command<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/enum.Event.html b/pr/2583/docs/iroh/gossip/proto/topic/enum.Event.html index b7c30048ee..b0aa8cabc1 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/enum.Event.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Event

source ·
pub enum Event<PI> {
+Event in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Event

pub enum Event<PI> {
     NeighborUp(PI),
     NeighborDown(PI),
     Received(GossipEvent<PI>),
@@ -6,29 +6,29 @@
 

Variants§

§

NeighborUp(PI)

We have a new, direct neighbor in the swarm membership layer for this topic

§

NeighborDown(PI)

We dropped direct neighbor in the swarm membership layer for this topic

§

Received(GossipEvent<PI>)

A gossip message was received for this topic

-

Trait Implementations§

source§

impl<PI> Clone for Event<PI>
where - PI: Clone,

source§

fn clone(&self) -> Event<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Event<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de, PI> Deserialize<'de> for Event<PI>
where - PI: Deserialize<'de>,

Trait Implementations§

§

impl<PI> Clone for Event<PI>
where + PI: Clone,

§

fn clone(&self) -> Event<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Event<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Event<PI>
where + PI: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Event<PI>, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
source§

impl<PI> Ord for Event<PI>
where - PI: Ord,

source§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl From<Event<PublicKey>> for GossipEvent

§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
§

impl<PI> Ord for Event<PI>
where + PI: Ord,

§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<PI> PartialEq for Event<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl<PI> PartialEq for Event<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<PI> PartialOrd for Event<PI>
where - PI: PartialOrd,

source§

fn partial_cmp(&self, other: &Event<PI>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl<PI> PartialOrd for Event<PI>
where + PI: PartialOrd,

§

fn partial_cmp(&self, other: &Event<PI>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl<PI> Serialize for Event<PI>
where - PI: Serialize,

source§

fn serialize<__S>( +operator. Read more

§

impl<PI> Serialize for Event<PI>
where + PI: Serialize,

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<PI> Eq for Event<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<PI> Eq for Event<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Event<PI>
where PI: Send,

§

impl<PI> Sync for Event<PI>
where PI: Sync,

§

impl<PI> Unpin for Event<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/enum.InEvent.html b/pr/2583/docs/iroh/gossip/proto/topic/enum.InEvent.html index 5e4e5d6e2c..9babf40a7e 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/enum.InEvent.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/enum.InEvent.html @@ -1,4 +1,4 @@ -InEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::InEvent

source ·
pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::InEvent

pub enum InEvent<PI> {
     RecvMessage(PI, Message<PI>),
     Command(Command<PI>),
     TimerExpired(Timer<PI>),
@@ -10,9 +10,9 @@
 
§

TimerExpired(Timer<PI>)

Trigger a previously scheduled timer.

§

PeerDisconnected(PI)

Peer disconnected on the network level.

§

UpdatePeerData(PeerData)

Update the opaque peer data about yourself.

-

Trait Implementations§

source§

impl<PI> Clone for InEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> InEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for InEvent<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for InEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> InEvent<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for InEvent<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for InEvent<PI>
where PI: Send,

§

impl<PI> Sync for InEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for InEvent<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/enum.Message.html b/pr/2583/docs/iroh/gossip/proto/topic/enum.Message.html index db5aae74e3..a524199312 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/enum.Message.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/enum.Message.html @@ -1,26 +1,26 @@ -Message in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Message

source ·
pub enum Message<PI> {
+Message in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Message

pub enum Message<PI> {
     Swarm(Message<PI>),
     Gossip(Message),
 }
Expand description

A protocol message for a particular topic

Variants§

§

Swarm(Message<PI>)

A message of the swarm membership layer

§

Gossip(Message)

A message of the gossip broadcast layer

-

Implementations§

source§

impl<PI> Message<PI>

source

pub fn kind(&self) -> MessageKind

Get the kind of this message

-

Trait Implementations§

source§

impl<PI> Clone for Message<PI>
where - PI: Clone,

source§

fn clone(&self) -> Message<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Message<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de, PI> Deserialize<'de> for Message<PI>
where - PI: Deserialize<'de>,

Implementations§

§

impl<PI> Message<PI>

pub fn kind(&self) -> MessageKind

Get the kind of this message

+

Trait Implementations§

§

impl<PI> Clone for Message<PI>
where + PI: Clone,

§

fn clone(&self) -> Message<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Message<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Message<PI>
where + PI: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Message<PI>, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<PI> From<Message<PI>> for Message<PI>

source§

fn from(value: Message<PI>) -> Message<PI>

Converts to this type from the input type.
source§

impl<PI> From<Message> for Message<PI>

source§

fn from(value: Message) -> Message<PI>

Converts to this type from the input type.
source§

impl<PI> PartialEq for Message<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Message<PI>) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<PI> From<Message<PI>> for Message<PI>

§

fn from(value: Message<PI>) -> Message<PI>

Converts to this type from the input type.
§

impl<PI> From<Message> for Message<PI>

§

fn from(value: Message) -> Message<PI>

Converts to this type from the input type.
§

impl<PI> PartialEq for Message<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &Message<PI>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<PI> Serialize for Message<PI>
where - PI: Serialize,

source§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

§

impl<PI> Serialize for Message<PI>
where + PI: Serialize,

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<PI> Eq for Message<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Message<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Message<PI>

§

impl<PI> RefUnwindSafe for Message<PI>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<PI> Eq for Message<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Message<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Message<PI>

§

impl<PI> RefUnwindSafe for Message<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Message<PI>
where PI: Send,

§

impl<PI> Sync for Message<PI>
where PI: Sync,

§

impl<PI> Unpin for Message<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/enum.OutEvent.html b/pr/2583/docs/iroh/gossip/proto/topic/enum.OutEvent.html index 54cc32f60b..d792f4e483 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/enum.OutEvent.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/enum.OutEvent.html @@ -1,4 +1,4 @@ -OutEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::OutEvent

source ·
pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::OutEvent

pub enum OutEvent<PI> {
     SendMessage(PI, Message<PI>),
     EmitEvent(Event<PI>),
     ScheduleTimer(Duration, Timer<PI>),
@@ -11,12 +11,12 @@
 after the duration.

§

DisconnectPeer(PI)

Close the connection to a peer on the network level.

§

PeerData(PI, PeerData)

Emitted when new PeerData was received for a peer.

-

Trait Implementations§

source§

impl<PI> Debug for OutEvent<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

source§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
source§

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

source§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
source§

impl<PI> PartialEq for OutEvent<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &OutEvent<PI>) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl<PI> Debug for OutEvent<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
§

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
§

impl<PI> PartialEq for OutEvent<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &OutEvent<PI>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<PI> Eq for OutEvent<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for OutEvent<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where +sufficient, and should not be overridden without very good reason.

§

impl<PI> Eq for OutEvent<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for OutEvent<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for OutEvent<PI>
where PI: Send,

§

impl<PI> Sync for OutEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for OutEvent<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/enum.Timer.html b/pr/2583/docs/iroh/gossip/proto/topic/enum.Timer.html index f3561f1688..cec8be5801 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/enum.Timer.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/enum.Timer.html @@ -1,4 +1,4 @@ -Timer in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Timer

source ·
pub enum Timer<PI> {
+Timer in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Timer

pub enum Timer<PI> {
     Swarm(Timer<PI>),
     Gossip(Timer),
 }
Expand description

A timer to be registered for a particular topic.

@@ -6,13 +6,13 @@ to the protocol through InEvent::TimerExpired.

Variants§

§

Swarm(Timer<PI>)

A timer for the swarm layer

§

Gossip(Timer)

A timer for the gossip layer

-

Trait Implementations§

source§

impl<PI> Clone for Timer<PI>
where - PI: Clone,

source§

fn clone(&self) -> Timer<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI> Debug for Timer<PI>
where - PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<PI> From<Timer<PI>> for Timer<PI>

source§

fn from(value: Timer<PI>) -> Timer<PI>

Converts to this type from the input type.
source§

impl<PI> From<Timer> for Timer<PI>

source§

fn from(value: Timer) -> Timer<PI>

Converts to this type from the input type.
source§

impl<PI> PartialEq for Timer<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Timer<PI>) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl<PI> Clone for Timer<PI>
where + PI: Clone,

§

fn clone(&self) -> Timer<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<PI> Debug for Timer<PI>
where + PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<PI> From<Timer<PI>> for Timer<PI>

§

fn from(value: Timer<PI>) -> Timer<PI>

Converts to this type from the input type.
§

impl<PI> From<Timer> for Timer<PI>

§

fn from(value: Timer) -> Timer<PI>

Converts to this type from the input type.
§

impl<PI> PartialEq for Timer<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &Timer<PI>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<PI> Eq for Timer<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Timer<PI>

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where +sufficient, and should not be overridden without very good reason.

§

impl<PI> Eq for Timer<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Timer<PI>

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where PI: Freeze,

§

impl<PI> RefUnwindSafe for Timer<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Timer<PI>
where PI: Send,

§

impl<PI> Sync for Timer<PI>
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/index.html b/pr/2583/docs/iroh/gossip/proto/topic/index.html index 860ba3734c..c7868e8402 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/index.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/index.html @@ -1,3 +1,3 @@ -iroh::gossip::proto::topic - Rust

Module iroh::gossip::proto::topic

source ·
Expand description

This module contains the implementation of the gossiping protocol for an individual topic

+iroh::gossip::proto::topic - Rust

Module iroh::gossip::proto::topic

Expand description

This module contains the implementation of the gossiping protocol for an individual topic

Structs§

  • Protocol configuration
  • The topic state maintains the swarm membership and broadcast tree for a particular topic.
  • Statistics for the protocol state of a topic

Enums§

  • A command to the protocol state for a particular topic.
  • An event to be emitted to the application for a particular topic.
  • Input event to the topic state handler.
  • A protocol message for a particular topic
  • An output event from the state handler.
  • A timer to be registered for a particular topic.

Constants§

  • The default maximum size in bytes for a gossip message. This is a sane but arbitrary default and can be changed in the Config.

Traits§

  • A trait for a concrete type to push OutEvents to.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/proto/topic/struct.Config.html b/pr/2583/docs/iroh/gossip/proto/topic/struct.Config.html index 6100442aac..ce944bde5c 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/struct.Config.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/struct.Config.html @@ -1,4 +1,4 @@ -Config in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Config

source ·
pub struct Config {
+Config in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Config

pub struct Config {
     pub membership: Config,
     pub broadcast: Config,
     pub max_message_size: usize,
@@ -9,7 +9,7 @@
 

This size should be the same across a network to ensure all nodes can transmit and read large messages.

At minimum, this size should be large enough to send gossip control messages. This can vary, depending on the size of the PeerIdentity you use and the size of the PeerData you transmit in your messages.

The default is DEFAULT_MAX_MESSAGE_SIZE.

-

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Config

source§

fn default() -> Config

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Config

§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Config

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Config

§

fn default() -> Config

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/struct.State.html b/pr/2583/docs/iroh/gossip/proto/topic/struct.State.html index 22a85115c0..02f1e338aa 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/struct.State.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/struct.State.html @@ -1,33 +1,33 @@ -State in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::State

source ·
pub struct State<PI, R> { /* private fields */ }
Expand description

The topic state maintains the swarm membership and broadcast tree for a particular topic.

-

Implementations§

source§

impl<PI> State<PI, StdRng>
where - PI: PeerIdentity,

source

pub fn new( +State in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::State

pub struct State<PI, R> { /* private fields */ }
Expand description

The topic state maintains the swarm membership and broadcast tree for a particular topic.

+

Implementations§

§

impl<PI> State<PI, StdRng>
where + PI: PeerIdentity,

pub fn new( me: PI, me_data: Option<PeerData>, config: Config ) -> State<PI, StdRng>

Initialize the local state with the default random number generator.

-
source§

impl<PI, R> State<PI, R>

source

pub fn endpoint(&self) -> &PI

The address of your local endpoint.

-
source§

impl<PI, R> State<PI, R>
where +

§

impl<PI, R> State<PI, R>

pub fn endpoint(&self) -> &PI

The address of your local endpoint.

+
§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng,

source

pub fn with_rng( + R: Rng,

pub fn with_rng( me: PI, me_data: Option<PeerData>, config: Config, rng: R ) -> State<PI, R>

Initialize the local state with a custom random number generator.

-
source

pub fn handle( +

pub fn handle( &mut self, event: InEvent<PI>, now: Instant ) -> impl Iterator<Item = OutEvent<PI>>

Handle an incoming event.

Returns an iterator of outgoing events that must be processed by the application.

-
source

pub fn stats(&self) -> &Stats

Get stats on how many messages were sent and received

+

pub fn stats(&self) -> &Stats

Get stats on how many messages were sent and received

TODO: Remove/replace with metrics?

-
source

pub fn gossip_stats(&self) -> &Stats

Get statistics for the gossip broadcast state

+

pub fn gossip_stats(&self) -> &Stats

Get statistics for the gossip broadcast state

TODO: Remove/replace with metrics?

-
source

pub fn has_active_peers(&self) -> bool

Check if this topic has any active (connected) peers.

-

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where +

pub fn has_active_peers(&self) -> bool

Check if this topic has any active (connected) peers.

+

Trait Implementations§

§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - R: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>
where + R: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2583/docs/iroh/gossip/proto/topic/struct.Stats.html b/pr/2583/docs/iroh/gossip/proto/topic/struct.Stats.html index e7b32fc70e..bb30bef973 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/struct.Stats.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/struct.Stats.html @@ -1,10 +1,10 @@ -Stats in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Stats

source ·
pub struct Stats {
+Stats in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Stats

pub struct Stats {
     pub messages_sent: usize,
     pub messages_received: usize,
 }
Expand description

Statistics for the protocol state of a topic

Fields§

§messages_sent: usize

Number of messages sent

§messages_received: usize

Number of messages received

-

Trait Implementations§

source§

impl Clone for Stats

source§

fn clone(&self) -> Stats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Stats

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Stats

source§

fn default() -> Stats

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Stats

§

fn clone(&self) -> Stats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Stats

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Stats

§

fn default() -> Stats

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/gossip/proto/topic/trait.IO.html b/pr/2583/docs/iroh/gossip/proto/topic/trait.IO.html index 551c4d40ff..b9cec40f67 100644 --- a/pr/2583/docs/iroh/gossip/proto/topic/trait.IO.html +++ b/pr/2583/docs/iroh/gossip/proto/topic/trait.IO.html @@ -1,4 +1,4 @@ -IO in iroh::gossip::proto::topic - Rust

Trait iroh::gossip::proto::topic::IO

source ·
pub trait IO<PI>
where +IO in iroh::gossip::proto::topic - Rust

Trait iroh::gossip::proto::topic::IO

pub trait IO<PI>
where PI: Clone,
{ // Required method fn push(&mut self, event: impl Into<OutEvent<PI>>); @@ -11,10 +11,10 @@ }
Expand description

A trait for a concrete type to push OutEvents to.

The implementation is generic over this trait, which allows the upper layer to supply a container of their choice for OutEvents emitted from the protocol state.

-

Required Methods§

source

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

-

Provided Methods§

Required Methods§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

+

Provided Methods§

fn push_from_iter( &mut self, iter: impl IntoIterator<Item = impl Into<OutEvent<PI>>> )

Push all events from an iterator into the IO container

-

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where - PI: Clone,

source§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where + PI: Clone,

§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/proto/trait.IO.html b/pr/2583/docs/iroh/gossip/proto/trait.IO.html index 696df4d11f..b3081dfafd 100644 --- a/pr/2583/docs/iroh/gossip/proto/trait.IO.html +++ b/pr/2583/docs/iroh/gossip/proto/trait.IO.html @@ -1,4 +1,4 @@ -IO in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::IO

source ·
pub trait IO<PI>
where +IO in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::IO

pub trait IO<PI>
where PI: Clone,
{ // Required method fn push(&mut self, event: impl Into<OutEvent<PI>>); @@ -11,10 +11,10 @@ }
Expand description

A trait for a concrete type to push OutEvents to.

The implementation is generic over this trait, which allows the upper layer to supply a container of their choice for OutEvents emitted from the protocol state.

-

Required Methods§

source

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

-

Provided Methods§

Required Methods§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

+

Provided Methods§

fn push_from_iter( &mut self, iter: impl IntoIterator<Item = impl Into<OutEvent<PI>>> )

Push all events from an iterator into the IO container

-

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where - PI: Clone,

source§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where + PI: Clone,

§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/proto/trait.PeerIdentity.html b/pr/2583/docs/iroh/gossip/proto/trait.PeerIdentity.html index 1646a65bf6..fb6e41ea6b 100644 --- a/pr/2583/docs/iroh/gossip/proto/trait.PeerIdentity.html +++ b/pr/2583/docs/iroh/gossip/proto/trait.PeerIdentity.html @@ -1,4 +1,4 @@ -PeerIdentity in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::PeerIdentity

source ·
pub trait PeerIdentity: Hash + Eq + Copy + Debug + Serialize + DeserializeOwned { }
Expand description

The identifier for a peer.

+PeerIdentity in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::PeerIdentity

pub trait PeerIdentity: Hash + Eq + Copy + Debug + Serialize + DeserializeOwned { }
Expand description

The identifier for a peer.

The protocol implementation is generic over this trait. When implementing the protocol, a concrete type must be chosen that will then be used throughout the implementation to identify and index individual peers.

@@ -6,5 +6,5 @@ the protocol are only compatible if the same concrete type is supplied for this trait.

TODO: Rename to PeerId? It does not necessarily refer to a peer’s address, as long as the networking layer can translate the value of its concrete type into an address.

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> PeerIdentity for T
where +

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T> PeerIdentity for T

\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/proto/util/index.html b/pr/2583/docs/iroh/gossip/proto/util/index.html index 12401add36..81a3e9ca2a 100644 --- a/pr/2583/docs/iroh/gossip/proto/util/index.html +++ b/pr/2583/docs/iroh/gossip/proto/util/index.html @@ -1,2 +1,2 @@ -iroh::gossip::proto::util - Rust

Module iroh::gossip::proto::util

source ·
Expand description

Utilities used in the protocol implementation

+iroh::gossip::proto::util - Rust

Module iroh::gossip::proto::util

Expand description

Utilities used in the protocol implementation

Structs§

\ No newline at end of file diff --git a/pr/2583/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html b/pr/2583/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html index 128f719fac..2e595409b7 100644 --- a/pr/2583/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html +++ b/pr/2583/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html @@ -1,18 +1,18 @@ -TimeBoundCache in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimeBoundCache

source ·
pub struct TimeBoundCache<K, V> { /* private fields */ }
Expand description

A hash map where entries expire after a time

-

Implementations§

source§

impl<K, V> TimeBoundCache<K, V>
where - K: Hash + Eq + Clone,

source

pub fn insert(&mut self, key: K, value: V, expires: Instant)

Insert an item into the cache, marked with an expiration time.

-
source

pub fn contains_key(&self, key: &K) -> bool

Returns true if the map contains a value for the specified key.

-
source

pub fn remove(&mut self, key: &K) -> Option<V>

Remove an item from the cache.

-
source

pub fn len(&self) -> usize

Get the number of entries in the cache.

-
source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

-
source

pub fn get(&self, key: &K) -> Option<&V>

Get an item from the cache.

-
source

pub fn expires(&self, key: &K) -> Option<&Instant>

Get the expiration time for an item.

-
source

pub fn iter(&self) -> impl Iterator<Item = (&K, &V, &Instant)>

Iterate over all items in the cache.

-
source

pub fn expire_until(&mut self, instant: Instant) -> usize

Remove all entries with an expiry instant lower or equal to instant.

+TimeBoundCache in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimeBoundCache

pub struct TimeBoundCache<K, V> { /* private fields */ }
Expand description

A hash map where entries expire after a time

+

Implementations§

§

impl<K, V> TimeBoundCache<K, V>
where + K: Hash + Eq + Clone,

pub fn insert(&mut self, key: K, value: V, expires: Instant)

Insert an item into the cache, marked with an expiration time.

+

pub fn contains_key(&self, key: &K) -> bool

Returns true if the map contains a value for the specified key.

+

pub fn remove(&mut self, key: &K) -> Option<V>

Remove an item from the cache.

+

pub fn len(&self) -> usize

Get the number of entries in the cache.

+

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+

pub fn get(&self, key: &K) -> Option<&V>

Get an item from the cache.

+

pub fn expires(&self, key: &K) -> Option<&Instant>

Get the expiration time for an item.

+

pub fn iter(&self) -> impl Iterator<Item = (&K, &V, &Instant)>

Iterate over all items in the cache.

+

pub fn expire_until(&mut self, instant: Instant) -> usize

Remove all entries with an expiry instant lower or equal to instant.

Returns the number of items that were removed.

-

Trait Implementations§

source§

impl<K, V> Debug for TimeBoundCache<K, V>
where +

Trait Implementations§

§

impl<K, V> Debug for TimeBoundCache<K, V>
where K: Debug, - V: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<K, V> Default for TimeBoundCache<K, V>

source§

fn default() -> TimeBoundCache<K, V>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<K, V> Freeze for TimeBoundCache<K, V>

§

impl<K, V> RefUnwindSafe for TimeBoundCache<K, V>
where + V: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<K, V> Default for TimeBoundCache<K, V>

§

fn default() -> TimeBoundCache<K, V>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<K, V> Freeze for TimeBoundCache<K, V>

§

impl<K, V> RefUnwindSafe for TimeBoundCache<K, V>

§

impl<K, V> Send for TimeBoundCache<K, V>
where K: Send, diff --git a/pr/2583/docs/iroh/gossip/proto/util/struct.TimerMap.html b/pr/2583/docs/iroh/gossip/proto/util/struct.TimerMap.html index 5be6267751..2ef582c695 100644 --- a/pr/2583/docs/iroh/gossip/proto/util/struct.TimerMap.html +++ b/pr/2583/docs/iroh/gossip/proto/util/struct.TimerMap.html @@ -1,16 +1,16 @@ -TimerMap in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimerMap

source ·
pub struct TimerMap<T>(/* private fields */);
Expand description

A BTreeMap with Instant as key. Allows to process expired items.

-

Implementations§

source§

impl<T> TimerMap<T>

source

pub fn new() -> TimerMap<T>

Create a new, empty TimerMap.

-
source

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant.

-
source

pub fn drain_until( +TimerMap in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimerMap

pub struct TimerMap<T>(/* private fields */);
Expand description

A BTreeMap with Instant as key. Allows to process expired items.

+

Implementations§

§

impl<T> TimerMap<T>

pub fn new() -> TimerMap<T>

Create a new, empty TimerMap.

+

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant.

+

pub fn drain_until( &mut self, from: &Instant ) -> impl Iterator<Item = (Instant, T)>

Remove and return all entries before and equal to from.

-
source

pub fn first(&self) -> Option<(&Instant, &Vec<T>)>

Get a reference to the earliest entry in the TimerMap.

-
source

pub fn iter(&self) -> impl Iterator<Item = (&Instant, &T)>

Iterate over all items in the timer map.

-
source§

impl<T> TimerMap<T>
where - T: PartialEq,

source

pub fn remove(&mut self, instant: &Instant, item: &T)

Remove an entry from the specified instant.

-

Trait Implementations§

source§

impl<T> Debug for TimerMap<T>
where - T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for TimerMap<T>

source§

fn default() -> TimerMap<T>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for TimerMap<T>

§

impl<T> RefUnwindSafe for TimerMap<T>
where +

pub fn first(&self) -> Option<(&Instant, &Vec<T>)>

Get a reference to the earliest entry in the TimerMap.

+

pub fn iter(&self) -> impl Iterator<Item = (&Instant, &T)>

Iterate over all items in the timer map.

+
§

impl<T> TimerMap<T>
where + T: PartialEq,

pub fn remove(&mut self, instant: &Instant, item: &T)

Remove an entry from the specified instant.

+

Trait Implementations§

§

impl<T> Debug for TimerMap<T>
where + T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> Default for TimerMap<T>

§

fn default() -> TimerMap<T>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for TimerMap<T>

§

impl<T> RefUnwindSafe for TimerMap<T>
where T: RefUnwindSafe,

§

impl<T> Send for TimerMap<T>
where T: Send,

§

impl<T> Sync for TimerMap<T>
where T: Sync,

§

impl<T> Unpin for TimerMap<T>

§

impl<T> UnwindSafe for TimerMap<T>
where diff --git a/pr/2583/docs/iroh/metrics/struct.Metrics.html b/pr/2583/docs/iroh/metrics/struct.Metrics.html index eab76cb5a3..93f3c77626 100644 --- a/pr/2583/docs/iroh/metrics/struct.Metrics.html +++ b/pr/2583/docs/iroh/metrics/struct.Metrics.html @@ -1,18 +1,18 @@ Metrics in iroh::metrics - Rust

Struct iroh::metrics::Metrics

source ·
pub struct Metrics {
-    pub doc_gossip_tick_main: Counter,
-    pub doc_gossip_tick_event: Counter,
-    pub doc_gossip_tick_actor: Counter,
-    pub doc_gossip_tick_pending_join: Counter,
-    pub doc_live_tick_main: Counter,
-    pub doc_live_tick_actor: Counter,
-    pub doc_live_tick_replica_event: Counter,
-    pub doc_live_tick_running_sync_connect: Counter,
-    pub doc_live_tick_running_sync_accept: Counter,
-    pub doc_live_tick_pending_downloads: Counter,
+    pub doc_gossip_tick_main: Counter,
+    pub doc_gossip_tick_event: Counter,
+    pub doc_gossip_tick_actor: Counter,
+    pub doc_gossip_tick_pending_join: Counter,
+    pub doc_live_tick_main: Counter,
+    pub doc_live_tick_actor: Counter,
+    pub doc_live_tick_replica_event: Counter,
+    pub doc_live_tick_running_sync_connect: Counter,
+    pub doc_live_tick_running_sync_accept: Counter,
+    pub doc_live_tick_pending_downloads: Counter,
 }
Available on crate feature metrics only.
Expand description

Enum of metrics for the module

-

Fields§

§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/dialer/struct.Dialer.html b/pr/2583/docs/iroh/net/dialer/struct.Dialer.html index 0a052627d3..1473c40558 100644 --- a/pr/2583/docs/iroh/net/dialer/struct.Dialer.html +++ b/pr/2583/docs/iroh/net/dialer/struct.Dialer.html @@ -11,7 +11,7 @@

source

pub fn is_pending(&self, node: PublicKey) -> bool

Checks if a node is currently being dialed.

source

pub async fn next_conn(&mut self) -> (PublicKey, Result<Connection, Error>)

Waits for the next dial operation to complete.

source

pub fn pending_count(&self) -> usize

Number of pending connections to be opened.

-

Trait Implementations§

source§

impl Debug for Dialer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Dialer for Dialer

§

type Connection = Connection

Type of connections returned by the Dialer.
source§

fn queue_dial(&mut self, node_id: PublicKey)

Dial a node.
source§

fn pending_count(&self) -> usize

Get the number of dialing nodes.
source§

fn is_pending(&self, node: PublicKey) -> bool

Check if a node is being dialed.
source§

impl Stream for Dialer

§

type Item = (PublicKey, Result<Connection, Error>)

Values yielded by the stream.
source§

fn poll_next( +

Trait Implementations§

source§

impl Debug for Dialer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Dialer for Dialer

§

type Connection = Connection

Type of connections returned by the Dialer.
§

fn queue_dial(&mut self, node_id: PublicKey)

Dial a node.
§

fn pending_count(&self) -> usize

Get the number of dialing nodes.
§

fn is_pending(&self, node: PublicKey) -> bool

Check if a node is being dialed.
source§

impl Stream for Dialer

§

type Item = (PublicKey, Result<Connection, Error>)

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut Dialer>, cx: &mut Context<'_> ) -> Poll<Option<<Dialer as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the diff --git a/pr/2583/docs/iroh/net/endpoint/enum.ConnectionError.html b/pr/2583/docs/iroh/net/endpoint/enum.ConnectionError.html index f3ad39b8ca..634e883594 100644 --- a/pr/2583/docs/iroh/net/endpoint/enum.ConnectionError.html +++ b/pr/2583/docs/iroh/net/endpoint/enum.ConnectionError.html @@ -17,7 +17,7 @@ period even if the peer is still reachable. See also TransportConfig::max_idle_timeout() and TransportConfig::keep_alive_interval().

§

LocallyClosed

The local application closed the connection

-

Trait Implementations§

§

impl Clone for ConnectionError

§

fn clone(&self) -> ConnectionError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ConnectionError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ConnectionError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for ConnectionError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<Close> for ConnectionError

§

fn from(x: Close) -> ConnectionError

Converts to this type from the input type.
source§

impl From<ConnectionError> for GetError

source§

fn from(value: ConnectionError) -> GetError

Converts to this type from the input type.
source§

impl From<ConnectionError> for GetResponseError

source§

fn from(source: ConnectionError) -> GetResponseError

Converts to this type from the input type.
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
§

impl From<Error> for ConnectionError

§

fn from(source: Error) -> ConnectionError

Converts to this type from the input type.
§

impl PartialEq for ConnectionError

§

fn eq(&self, other: &ConnectionError) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for ConnectionError

§

fn clone(&self) -> ConnectionError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ConnectionError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ConnectionError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for ConnectionError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<Close> for ConnectionError

§

fn from(x: Close) -> ConnectionError

Converts to this type from the input type.
§

impl From<ConnectionError> for GetError

§

fn from(value: ConnectionError) -> GetError

Converts to this type from the input type.
§

impl From<ConnectionError> for GetResponseError

§

fn from(source: ConnectionError) -> GetResponseError

Converts to this type from the input type.
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
§

impl From<Error> for ConnectionError

§

fn from(source: Error) -> ConnectionError

Converts to this type from the input type.
§

impl PartialEq for ConnectionError

§

fn eq(&self, other: &ConnectionError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for ConnectionError

§

impl StructuralPartialEq for ConnectionError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/endpoint/enum.ReadError.html b/pr/2583/docs/iroh/net/endpoint/enum.ReadError.html index c127f54b04..b5ad5db8c9 100644 --- a/pr/2583/docs/iroh/net/endpoint/enum.ReadError.html +++ b/pr/2583/docs/iroh/net/endpoint/enum.ReadError.html @@ -15,7 +15,7 @@
§

ZeroRttRejected

This was a 0-RTT stream and the server rejected it

Can only occur on clients for 0-RTT streams, which can be opened using Connecting::into_0rtt().

-

Trait Implementations§

§

impl Clone for ReadError

§

fn clone(&self) -> ReadError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ReadError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ReadError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for ReadError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
source§

impl From<ReadError> for GetError

source§

fn from(value: ReadError) -> GetError

Converts to this type from the input type.
source§

impl From<ReadError> for GetResponseError

source§

fn from(source: ReadError) -> GetResponseError

Converts to this type from the input type.
§

impl From<ReadableError> for ReadError

§

fn from(e: ReadableError) -> ReadError

Converts to this type from the input type.
§

impl PartialEq for ReadError

§

fn eq(&self, other: &ReadError) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for ReadError

§

fn clone(&self) -> ReadError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ReadError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ReadError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for ReadError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
§

impl From<ReadError> for GetError

§

fn from(value: ReadError) -> GetError

Converts to this type from the input type.
§

impl From<ReadError> for GetResponseError

§

fn from(source: ReadError) -> GetResponseError

Converts to this type from the input type.
§

impl From<ReadableError> for ReadError

§

fn from(e: ReadableError) -> ReadError

Converts to this type from the input type.
§

impl PartialEq for ReadError

§

fn eq(&self, other: &ReadError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for ReadError

§

impl StructuralPartialEq for ReadError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/endpoint/enum.WriteError.html b/pr/2583/docs/iroh/net/endpoint/enum.WriteError.html index 576a46a134..8600c2b8e1 100644 --- a/pr/2583/docs/iroh/net/endpoint/enum.WriteError.html +++ b/pr/2583/docs/iroh/net/endpoint/enum.WriteError.html @@ -11,7 +11,7 @@
§

ZeroRttRejected

This was a 0-RTT stream and the server rejected it

Can only occur on clients for 0-RTT streams, which can be opened using Connecting::into_0rtt().

-

Trait Implementations§

§

impl Clone for WriteError

§

fn clone(&self) -> WriteError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for WriteError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for WriteError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for WriteError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
source§

impl From<WriteError> for ConnectedNextError

source§

fn from(source: WriteError) -> ConnectedNextError

Converts to this type from the input type.
source§

impl From<WriteError> for GetError

source§

fn from(value: WriteError) -> GetError

Converts to this type from the input type.
source§

impl From<WriteError> for GetResponseError

source§

fn from(source: WriteError) -> GetResponseError

Converts to this type from the input type.
§

impl PartialEq for WriteError

§

fn eq(&self, other: &WriteError) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl Clone for WriteError

§

fn clone(&self) -> WriteError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for WriteError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for WriteError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for WriteError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
§

impl From<WriteError> for ConnectedNextError

§

fn from(source: WriteError) -> ConnectedNextError

Converts to this type from the input type.
§

impl From<WriteError> for GetError

§

fn from(value: WriteError) -> GetError

Converts to this type from the input type.
§

impl From<WriteError> for GetResponseError

§

fn from(source: WriteError) -> GetResponseError

Converts to this type from the input type.
§

impl PartialEq for WriteError

§

fn eq(&self, other: &WriteError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for WriteError

§

impl StructuralPartialEq for WriteError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/endpoint/struct.AddrInfo.html b/pr/2583/docs/iroh/net/endpoint/struct.AddrInfo.html index ed960c892d..1bb6a7f54b 100644 --- a/pr/2583/docs/iroh/net/endpoint/struct.AddrInfo.html +++ b/pr/2583/docs/iroh/net/endpoint/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::AddrInfo

source ·
pub struct AddrInfo {
+AddrInfo in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::AddrInfo

pub struct AddrInfo {
     pub relay_url: Option<RelayUrl>,
     pub direct_addresses: BTreeSet<SocketAddr>,
 }
Expand description

Network paths to contact an iroh-net node.

@@ -7,26 +7,26 @@ other node, see NodeAddr for details.

Fields§

§relay_url: Option<RelayUrl>

The node’s home relay url.

§direct_addresses: BTreeSet<SocketAddr>

Socket addresses where the peer might be reached directly.

-

Implementations§

source§

impl AddrInfo

source

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

-
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

Implementations§

§

impl AddrInfo

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

+

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in ab AddrInfo received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-

Trait Implementations§

source§

impl Clone for AddrInfo

source§

fn clone(&self) -> AddrInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AddrInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for AddrInfo

source§

fn default() -> AddrInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AddrInfo

Trait Implementations§

§

impl Clone for AddrInfo

§

fn clone(&self) -> AddrInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for AddrInfo

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for AddrInfo

§

fn default() -> AddrInfo

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for AddrInfo

§

fn deserialize<__D>( __deserializer: __D ) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> AddrInfo

Converts to this type from the input type.
source§

impl Ord for AddrInfo

source§

fn cmp(&self, other: &AddrInfo) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> AddrInfo

Converts to this type from the input type.
§

impl Ord for AddrInfo

§

fn cmp(&self, other: &AddrInfo) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for AddrInfo

source§

fn eq(&self, other: &AddrInfo) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for AddrInfo

§

fn eq(&self, other: &AddrInfo) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AddrInfo

source§

fn partial_cmp(&self, other: &AddrInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for AddrInfo

§

fn partial_cmp(&self, other: &AddrInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for AddrInfo

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for AddrInfo

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AddrInfo

source§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for AddrInfo

§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/endpoint/struct.NodeAddr.html b/pr/2583/docs/iroh/net/endpoint/struct.NodeAddr.html index ac6502ef2d..e4aa942989 100644 --- a/pr/2583/docs/iroh/net/endpoint/struct.NodeAddr.html +++ b/pr/2583/docs/iroh/net/endpoint/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::NodeAddr

source ·
pub struct NodeAddr {
+NodeAddr in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::NodeAddr

pub struct NodeAddr {
     pub node_id: PublicKey,
     pub info: AddrInfo,
 }
Expand description

Network-level addressing information for an iroh-net node.

@@ -25,38 +25,38 @@ whenever a connection to other nodes needs to be established.

Fields§

§node_id: PublicKey

The node’s identifier.

§info: AddrInfo

Addressing information to connect to Self::node_id.

-

Implementations§

source§

impl NodeAddr

source

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

-
source

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url to the node’s AddrInfo.

-
source

pub fn with_direct_addresses( +

Implementations§

§

impl NodeAddr

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

+

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url to the node’s AddrInfo.

+

pub fn with_direct_addresses( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

Adds the given direct addresses to the peer’s AddrInfo.

-
source

pub fn from_parts( +

pub fn from_parts( node_id: PublicKey, relay_url: Option<RelayUrl>, direct_addresses: Vec<SocketAddr> ) -> NodeAddr

Creates a new NodeAddr from its parts.

-
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in a NodeAddr received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-
source

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

-
source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

-

Trait Implementations§

source§

impl Clone for NodeAddr

source§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NodeAddr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NodeAddr

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

+

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

+

Trait Implementations§

§

impl Clone for NodeAddr

§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for NodeAddr

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NodeAddr

§

fn deserialize<__D>( __deserializer: __D ) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

source§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(info: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl Ord for NodeAddr

source§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(info: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
§

impl Ord for NodeAddr

§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for NodeAddr

source§

fn eq(&self, other: &NodeAddr) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for NodeAddr

§

fn eq(&self, other: &NodeAddr) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for NodeAddr

source§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for NodeAddr

§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for NodeAddr

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for NodeAddr

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NodeAddr

source§

impl StructuralPartialEq for NodeAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for NodeAddr

§

impl StructuralPartialEq for NodeAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/endpoint/struct.VarInt.html b/pr/2583/docs/iroh/net/endpoint/struct.VarInt.html index 3dc7cbfbea..b5d2ab4cf5 100644 --- a/pr/2583/docs/iroh/net/endpoint/struct.VarInt.html +++ b/pr/2583/docs/iroh/net/endpoint/struct.VarInt.html @@ -8,7 +8,7 @@
§Safety

x must be less than 2^62.

pub const fn into_inner(self) -> u64

Extract the integer value

-

Trait Implementations§

§

impl Clone for VarInt

§

fn clone(&self) -> VarInt

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for VarInt

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for VarInt

§

fn default() -> VarInt

Returns the “default value” for a type. Read more
§

impl Display for VarInt

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<Closed> for VarInt

source§

fn from(source: Closed) -> VarInt

Converts to this type from the input type.
§

impl From<StreamId> for VarInt

§

fn from(x: StreamId) -> VarInt

Converts to this type from the input type.
§

impl From<u16> for VarInt

§

fn from(x: u16) -> VarInt

Converts to this type from the input type.
§

impl From<u32> for VarInt

§

fn from(x: u32) -> VarInt

Converts to this type from the input type.
§

impl From<u8> for VarInt

§

fn from(x: u8) -> VarInt

Converts to this type from the input type.
§

impl Hash for VarInt

§

fn hash<__H>(&self, state: &mut __H)
where +

Trait Implementations§

§

impl Clone for VarInt

§

fn clone(&self) -> VarInt

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for VarInt

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for VarInt

§

fn default() -> VarInt

Returns the “default value” for a type. Read more
§

impl Display for VarInt

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<Closed> for VarInt

§

fn from(source: Closed) -> VarInt

Converts to this type from the input type.
§

impl From<StreamId> for VarInt

§

fn from(x: StreamId) -> VarInt

Converts to this type from the input type.
§

impl From<u16> for VarInt

§

fn from(x: u16) -> VarInt

Converts to this type from the input type.
§

impl From<u32> for VarInt

§

fn from(x: u32) -> VarInt

Converts to this type from the input type.
§

impl From<u8> for VarInt

§

fn from(x: u8) -> VarInt

Converts to this type from the input type.
§

impl Hash for VarInt

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for VarInt

§

fn cmp(&self, other: &VarInt) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where @@ -18,7 +18,7 @@
§Safety
by ==.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for VarInt

§

fn partial_cmp(&self, other: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl TryFrom<VarInt> for Closed

§

type Error = UnknownErrorCode

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Closed, <Closed as TryFrom<VarInt>>::Error>

Performs the conversion.
§

impl TryFrom<u128> for VarInt

§

fn try_from(x: u128) -> Result<VarInt, VarIntBoundsExceeded>

Succeeds iff x < 2^62

+operator. Read more
§

impl TryFrom<VarInt> for Closed

§

type Error = UnknownErrorCode

The type returned in the event of a conversion error.
§

fn try_from(value: VarInt) -> Result<Closed, <Closed as TryFrom<VarInt>>::Error>

Performs the conversion.
§

impl TryFrom<u128> for VarInt

§

fn try_from(x: u128) -> Result<VarInt, VarIntBoundsExceeded>

Succeeds iff x < 2^62

§

type Error = VarIntBoundsExceeded

The type returned in the event of a conversion error.
§

impl TryFrom<u64> for VarInt

§

fn try_from(x: u64) -> Result<VarInt, VarIntBoundsExceeded>

Succeeds iff x < 2^62

§

type Error = VarIntBoundsExceeded

The type returned in the event of a conversion error.
§

impl TryFrom<usize> for VarInt

§

fn try_from(x: usize) -> Result<VarInt, VarIntBoundsExceeded>

Succeeds iff x < 2^62

§

type Error = VarIntBoundsExceeded

The type returned in the event of a conversion error.
§

impl Copy for VarInt

§

impl Eq for VarInt

§

impl StructuralPartialEq for VarInt

Auto Trait Implementations§

§

impl Freeze for VarInt

§

impl RefUnwindSafe for VarInt

§

impl Send for VarInt

§

impl Sync for VarInt

§

impl Unpin for VarInt

§

impl UnwindSafe for VarInt

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2583/docs/iroh/net/key/enum.KeyParsingError.html b/pr/2583/docs/iroh/net/key/enum.KeyParsingError.html index 0ddbe68a14..d3fd8641a1 100644 --- a/pr/2583/docs/iroh/net/key/enum.KeyParsingError.html +++ b/pr/2583/docs/iroh/net/key/enum.KeyParsingError.html @@ -1,10 +1,10 @@ -KeyParsingError in iroh::net::key - Rust

Enum iroh::net::key::KeyParsingError

source ·
pub enum KeyParsingError {
+KeyParsingError in iroh::net::key - Rust

Enum iroh::net::key::KeyParsingError

pub enum KeyParsingError {
     Base32(HexOrBase32ParseError),
     Key(Error),
 }
Expand description

Error when deserialising a PublicKey or a SecretKey.

Variants§

§

Base32(HexOrBase32ParseError)

Error when decoding the base32.

§

Key(Error)

Error when decoding the public key.

-

Trait Implementations§

source§

impl Debug for KeyParsingError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for KeyParsingError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for KeyParsingError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for KeyParsingError

source§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
source§

impl From<HexOrBase32ParseError> for KeyParsingError

source§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for KeyParsingError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for KeyParsingError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for KeyParsingError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<Error> for KeyParsingError

§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
§

impl From<HexOrBase32ParseError> for KeyParsingError

§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/key/index.html b/pr/2583/docs/iroh/net/key/index.html index e9985e2de8..8aca1c4822 100644 --- a/pr/2583/docs/iroh/net/key/index.html +++ b/pr/2583/docs/iroh/net/key/index.html @@ -1,2 +1,2 @@ -iroh::net::key - Rust

Module iroh::net::key

source ·
Expand description

Cryptographic key handling for iroh-net.

+iroh::net::key - Rust

Module iroh::net::key

Expand description

Cryptographic key handling for iroh-net.

Structs§

Enums§

Constants§

Type Aliases§

  • The identifier for a node in the (iroh) network.
\ No newline at end of file diff --git a/pr/2583/docs/iroh/net/key/struct.PublicKey.html b/pr/2583/docs/iroh/net/key/struct.PublicKey.html index 9275e76448..00b090b265 100644 --- a/pr/2583/docs/iroh/net/key/struct.PublicKey.html +++ b/pr/2583/docs/iroh/net/key/struct.PublicKey.html @@ -1,45 +1,45 @@ -PublicKey in iroh::net::key - Rust

Struct iroh::net::key::PublicKey

source ·
pub struct PublicKey(/* private fields */);
Expand description

A public key.

+PublicKey in iroh::net::key - Rust

Struct iroh::net::key::PublicKey

pub struct PublicKey(/* private fields */);
Expand description

A public key.

The key itself is just a 32 byte array, but a key has associated crypto information that is cached for performance reasons.

The cache item will be refreshed every time a crypto operation is performed, or when a key is deserialised or created from a byte array.

Serialisation or creation from a byte array is cheap if the key is already in the cache, but expensive if it is not.

-

Implementations§

source§

impl PublicKey

source

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

-
source

pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

Construct a PublicKey from a slice of bytes.

+

Implementations§

§

impl PublicKey

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

+

pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

Construct a PublicKey from a slice of bytes.

§Warning

This will return a [SignatureError] if the bytes passed into this method do not represent a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes. See [VerifyingKey::from_bytes] for details.

-
source

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this secret key’s public key.

+

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this secret key’s public key.

§Return

Returns Ok(()) if the signature is valid, and Err otherwise.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the key.

-

Trait Implementations§

source§

impl AsRef<[u8]> for PublicKey

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for PublicKey

source§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PublicKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PublicKey

Trait Implementations§

§

impl AsRef<[u8]> for PublicKey

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Clone for PublicKey

§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for PublicKey

§

fn deserialize<D>( deserializer: D ) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for PublicKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<VerifyingKey> for PublicKey

source§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
source§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

+ D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Display for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
§

impl From<VerifyingKey> for PublicKey

§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

Display is capable of serialising this format.

-
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for PublicKey

source§

fn hash<H>(&self, state: &mut H)
where +
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more

§

impl Hash for PublicKey

§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for PublicKey

source§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for PublicKey

§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for PublicKey

source§

fn eq(&self, other: &PublicKey) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
§

impl PartialEq for PublicKey

§

fn eq(&self, other: &PublicKey) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for PublicKey

source§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for PublicKey

§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for PublicKey

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for PublicKey

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( bytes: &[u8] -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
source§

impl TryFrom<&[u8; 32]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
§

impl TryFrom<&[u8; 32]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( bytes: &[u8; 32] -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
source§

impl Copy for PublicKey

source§

impl Eq for PublicKey

source§

impl StructuralPartialEq for PublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
§

impl Copy for PublicKey

§

impl Eq for PublicKey

§

impl StructuralPartialEq for PublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where @@ -174,7 +174,7 @@
§Return
S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2583/docs/iroh/net/key/struct.SecretKey.html b/pr/2583/docs/iroh/net/key/struct.SecretKey.html index 1debcb14b9..f7ce2d8766 100644 --- a/pr/2583/docs/iroh/net/key/struct.SecretKey.html +++ b/pr/2583/docs/iroh/net/key/struct.SecretKey.html @@ -1,24 +1,24 @@ -SecretKey in iroh::net::key - Rust

Struct iroh::net::key::SecretKey

source ·
pub struct SecretKey { /* private fields */ }
Expand description

A secret key.

-

Implementations§

source§

impl SecretKey

source

pub fn shared(&self, other: &PublicKey) -> SharedSecret

Returns the shared key for communication between this key and other.

-
source§

impl SecretKey

source

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

-
source

pub fn generate() -> SecretKey

Generate a new SecretKey with the default randomness generator.

-
source

pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKey
where +SecretKey in iroh::net::key - Rust

Struct iroh::net::key::SecretKey

pub struct SecretKey { /* private fields */ }
Expand description

A secret key.

+

Implementations§

§

impl SecretKey

pub fn shared(&self, other: &PublicKey) -> SharedSecret

Returns the shared key for communication between this key and other.

+
§

impl SecretKey

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

+

pub fn generate() -> SecretKey

Generate a new SecretKey with the default randomness generator.

+

pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKey
where R: CryptoRngCore + ?Sized,

Generate a new SecretKey with a randomness generator.

-
source

pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

Serialise this key to OpenSSH format.

-
source

pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
where +

pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

Serialise this key to OpenSSH format.

+

pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
where T: AsRef<[u8]>,

Deserialise this key from OpenSSH format.

-
source

pub fn sign(&self, msg: &[u8]) -> Signature

Sign the given message and return a digital signature

-
source

pub fn to_bytes(&self) -> [u8; 32]

Convert this to the bytes representing the secret part. +

pub fn sign(&self, msg: &[u8]) -> Signature

Sign the given message and return a digital signature

+

pub fn to_bytes(&self) -> [u8; 32]

Convert this to the bytes representing the secret part. The public part can always be recovered.

-
source

pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

Create a secret key from its byte representation.

-

Trait Implementations§

source§

impl Clone for SecretKey

source§

fn clone(&self) -> SecretKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SecretKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SecretKey

pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

Create a secret key from its byte representation.

+

Trait Implementations§

§

impl Clone for SecretKey

§

fn clone(&self) -> SecretKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SecretKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SecretKey

§

fn deserialize<D>( deserializer: D ) -> Result<SecretKey, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for SecretKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<[u8; 32]> for SecretKey

source§

fn from(value: [u8; 32]) -> SecretKey

Converts to this type from the input type.
source§

impl From<SigningKey> for SecretKey

source§

fn from(secret: SigningKey) -> SecretKey

Converts to this type from the input type.
source§

impl FromStr for SecretKey

§

type Err = KeyParsingError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Serialize for SecretKey

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for SecretKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<[u8; 32]> for SecretKey

§

fn from(value: [u8; 32]) -> SecretKey

Converts to this type from the input type.
§

impl From<SigningKey> for SecretKey

§

fn from(secret: SigningKey) -> SecretKey

Converts to this type from the input type.
§

impl FromStr for SecretKey

§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Serialize for SecretKey

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&[u8]> for SecretKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFrom<&[u8]> for SecretKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( bytes: &[u8] ) -> Result<SecretKey, <SecretKey as TryFrom<&[u8]>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/key/struct.SharedSecret.html b/pr/2583/docs/iroh/net/key/struct.SharedSecret.html index 5ea8b2912f..cd4fd62343 100644 --- a/pr/2583/docs/iroh/net/key/struct.SharedSecret.html +++ b/pr/2583/docs/iroh/net/key/struct.SharedSecret.html @@ -1,7 +1,7 @@ -SharedSecret in iroh::net::key - Rust

Struct iroh::net::key::SharedSecret

source ·
pub struct SharedSecret(/* private fields */);
Expand description

Shared Secret.

-

Implementations§

source§

impl SharedSecret

source

pub fn seal(&self, buffer: &mut dyn Buffer)

Seals the provided cleartext.

-
source

pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

-

Trait Implementations§

source§

impl Debug for SharedSecret

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +SharedSecret in iroh::net::key - Rust

Struct iroh::net::key::SharedSecret

pub struct SharedSecret(/* private fields */);
Expand description

Shared Secret.

+

Implementations§

§

impl SharedSecret

pub fn seal(&self, buffer: &mut dyn Buffer)

Seals the provided cleartext.

+

pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

+

Trait Implementations§

§

impl Debug for SharedSecret

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/key/type.NodeId.html b/pr/2583/docs/iroh/net/key/type.NodeId.html index 96f52d49a0..9f7bc41511 100644 --- a/pr/2583/docs/iroh/net/key/type.NodeId.html +++ b/pr/2583/docs/iroh/net/key/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh::net::key - Rust

Type Alias iroh::net::key::NodeId

source ·
pub type NodeId = PublicKey;
Expand description

The identifier for a node in the (iroh) network.

+NodeId in iroh::net::key - Rust

Type Alias iroh::net::key::NodeId

pub type NodeId = PublicKey;
Expand description

The identifier for a node in the (iroh) network.

Each node in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify a node. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific node only.

diff --git a/pr/2583/docs/iroh/net/metrics/struct.MagicsockMetrics.html b/pr/2583/docs/iroh/net/metrics/struct.MagicsockMetrics.html index d9f99e67d0..9671d4e320 100644 --- a/pr/2583/docs/iroh/net/metrics/struct.MagicsockMetrics.html +++ b/pr/2583/docs/iroh/net/metrics/struct.MagicsockMetrics.html @@ -1,53 +1,53 @@ MagicsockMetrics in iroh::net::metrics - Rust

Struct iroh::net::metrics::MagicsockMetrics

source ·
pub struct MagicsockMetrics {
Show 40 fields - pub re_stun_calls: Counter, - pub update_direct_addrs: Counter, - pub send_ipv4: Counter, - pub send_ipv6: Counter, - pub send_relay: Counter, - pub send_relay_error: Counter, - pub send_data: Counter, - pub send_data_network_down: Counter, - pub recv_data_relay: Counter, - pub recv_data_ipv4: Counter, - pub recv_data_ipv6: Counter, - pub recv_datagrams: Counter, - pub send_disco_udp: Counter, - pub send_disco_relay: Counter, - pub sent_disco_udp: Counter, - pub sent_disco_relay: Counter, - pub sent_disco_ping: Counter, - pub sent_disco_pong: Counter, - pub sent_disco_call_me_maybe: Counter, - pub recv_disco_bad_key: Counter, - pub recv_disco_bad_parse: Counter, - pub recv_disco_udp: Counter, - pub recv_disco_relay: Counter, - pub recv_disco_ping: Counter, - pub recv_disco_pong: Counter, - pub recv_disco_call_me_maybe: Counter, - pub recv_disco_call_me_maybe_bad_disco: Counter, - pub relay_home_change: Counter, - pub num_direct_conns_added: Counter, - pub num_direct_conns_removed: Counter, - pub num_relay_conns_added: Counter, - pub num_relay_conns_removed: Counter, - pub actor_tick_main: Counter, - pub actor_tick_msg: Counter, - pub actor_tick_re_stun: Counter, - pub actor_tick_portmap_changed: Counter, - pub actor_tick_direct_addr_heartbeat: Counter, - pub actor_tick_direct_addr_update_receiver: Counter, - pub actor_link_change: Counter, - pub actor_tick_other: Counter, + pub re_stun_calls: Counter, + pub update_direct_addrs: Counter, + pub send_ipv4: Counter, + pub send_ipv6: Counter, + pub send_relay: Counter, + pub send_relay_error: Counter, + pub send_data: Counter, + pub send_data_network_down: Counter, + pub recv_data_relay: Counter, + pub recv_data_ipv4: Counter, + pub recv_data_ipv6: Counter, + pub recv_datagrams: Counter, + pub send_disco_udp: Counter, + pub send_disco_relay: Counter, + pub sent_disco_udp: Counter, + pub sent_disco_relay: Counter, + pub sent_disco_ping: Counter, + pub sent_disco_pong: Counter, + pub sent_disco_call_me_maybe: Counter, + pub recv_disco_bad_key: Counter, + pub recv_disco_bad_parse: Counter, + pub recv_disco_udp: Counter, + pub recv_disco_relay: Counter, + pub recv_disco_ping: Counter, + pub recv_disco_pong: Counter, + pub recv_disco_call_me_maybe: Counter, + pub recv_disco_call_me_maybe_bad_disco: Counter, + pub relay_home_change: Counter, + pub num_direct_conns_added: Counter, + pub num_direct_conns_removed: Counter, + pub num_relay_conns_added: Counter, + pub num_relay_conns_removed: Counter, + pub actor_tick_main: Counter, + pub actor_tick_msg: Counter, + pub actor_tick_re_stun: Counter, + pub actor_tick_portmap_changed: Counter, + pub actor_tick_direct_addr_heartbeat: Counter, + pub actor_tick_direct_addr_update_receiver: Counter, + pub actor_link_change: Counter, + pub actor_tick_other: Counter,
}
Expand description

Enum of metrics for the module

-

Fields§

§re_stun_calls: Counter§update_direct_addrs: Counter§send_ipv4: Counter§send_ipv6: Counter§send_relay: Counter§send_relay_error: Counter§send_data: Counter§send_data_network_down: Counter§recv_data_relay: Counter§recv_data_ipv4: Counter§recv_data_ipv6: Counter§recv_datagrams: Counter

Number of QUIC datagrams received.

-
§send_disco_udp: Counter§send_disco_relay: Counter§sent_disco_udp: Counter§sent_disco_relay: Counter§sent_disco_ping: Counter§sent_disco_pong: Counter§sent_disco_call_me_maybe: Counter§recv_disco_bad_key: Counter§recv_disco_bad_parse: Counter§recv_disco_udp: Counter§recv_disco_relay: Counter§recv_disco_ping: Counter§recv_disco_pong: Counter§recv_disco_call_me_maybe: Counter§recv_disco_call_me_maybe_bad_disco: Counter§relay_home_change: Counter§num_direct_conns_added: Counter

The number of direct connections we have made to peers.

-
§num_direct_conns_removed: Counter

The number of direct connections we have lost to peers.

-
§num_relay_conns_added: Counter

The number of connections to peers we have added over relay.

-
§num_relay_conns_removed: Counter

The number of connections to peers we have removed over relay.

-
§actor_tick_main: Counter§actor_tick_msg: Counter§actor_tick_re_stun: Counter§actor_tick_portmap_changed: Counter§actor_tick_direct_addr_heartbeat: Counter§actor_tick_direct_addr_update_receiver: Counter§actor_link_change: Counter§actor_tick_other: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§re_stun_calls: Counter§update_direct_addrs: Counter§send_ipv4: Counter§send_ipv6: Counter§send_relay: Counter§send_relay_error: Counter§send_data: Counter§send_data_network_down: Counter§recv_data_relay: Counter§recv_data_ipv4: Counter§recv_data_ipv6: Counter§recv_datagrams: Counter

Number of QUIC datagrams received.

+
§send_disco_udp: Counter§send_disco_relay: Counter§sent_disco_udp: Counter§sent_disco_relay: Counter§sent_disco_ping: Counter§sent_disco_pong: Counter§sent_disco_call_me_maybe: Counter§recv_disco_bad_key: Counter§recv_disco_bad_parse: Counter§recv_disco_udp: Counter§recv_disco_relay: Counter§recv_disco_ping: Counter§recv_disco_pong: Counter§recv_disco_call_me_maybe: Counter§recv_disco_call_me_maybe_bad_disco: Counter§relay_home_change: Counter§num_direct_conns_added: Counter

The number of direct connections we have made to peers.

+
§num_direct_conns_removed: Counter

The number of direct connections we have lost to peers.

+
§num_relay_conns_added: Counter

The number of connections to peers we have added over relay.

+
§num_relay_conns_removed: Counter

The number of connections to peers we have removed over relay.

+
§actor_tick_main: Counter§actor_tick_msg: Counter§actor_tick_re_stun: Counter§actor_tick_portmap_changed: Counter§actor_tick_direct_addr_heartbeat: Counter§actor_tick_direct_addr_update_receiver: Counter§actor_link_change: Counter§actor_tick_other: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/metrics/struct.NetcheckMetrics.html b/pr/2583/docs/iroh/net/metrics/struct.NetcheckMetrics.html index ff2902fc0a..705f26bdf2 100644 --- a/pr/2583/docs/iroh/net/metrics/struct.NetcheckMetrics.html +++ b/pr/2583/docs/iroh/net/metrics/struct.NetcheckMetrics.html @@ -1,15 +1,15 @@ NetcheckMetrics in iroh::net::metrics - Rust

Struct iroh::net::metrics::NetcheckMetrics

source ·
pub struct NetcheckMetrics {
-    pub stun_packets_dropped: Counter,
-    pub stun_packets_sent_ipv4: Counter,
-    pub stun_packets_sent_ipv6: Counter,
-    pub stun_packets_recv_ipv4: Counter,
-    pub stun_packets_recv_ipv6: Counter,
-    pub reports: Counter,
-    pub reports_full: Counter,
+    pub stun_packets_dropped: Counter,
+    pub stun_packets_sent_ipv4: Counter,
+    pub stun_packets_sent_ipv6: Counter,
+    pub stun_packets_recv_ipv4: Counter,
+    pub stun_packets_recv_ipv6: Counter,
+    pub reports: Counter,
+    pub reports_full: Counter,
 }
Expand description

Enum of metrics for the module

-

Fields§

§stun_packets_dropped: Counter§stun_packets_sent_ipv4: Counter§stun_packets_sent_ipv6: Counter§stun_packets_recv_ipv4: Counter§stun_packets_recv_ipv6: Counter§reports: Counter§reports_full: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§stun_packets_dropped: Counter§stun_packets_sent_ipv4: Counter§stun_packets_sent_ipv6: Counter§stun_packets_recv_ipv4: Counter§stun_packets_recv_ipv6: Counter§reports: Counter§reports_full: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/metrics/struct.PortmapMetrics.html b/pr/2583/docs/iroh/net/metrics/struct.PortmapMetrics.html index 5caa9bbb22..688acf3589 100644 --- a/pr/2583/docs/iroh/net/metrics/struct.PortmapMetrics.html +++ b/pr/2583/docs/iroh/net/metrics/struct.PortmapMetrics.html @@ -1,19 +1,19 @@ PortmapMetrics in iroh::net::metrics - Rust

Struct iroh::net::metrics::PortmapMetrics

source ·
pub struct PortmapMetrics {
-    pub probes_started: Counter,
-    pub local_port_updates: Counter,
-    pub mapping_attempts: Counter,
-    pub mapping_failures: Counter,
-    pub external_address_updated: Counter,
-    pub upnp_probes: Counter,
-    pub upnp_probes_failed: Counter,
-    pub upnp_available: Counter,
-    pub upnp_gateway_updated: Counter,
-    pub pcp_probes: Counter,
-    pub pcp_available: Counter,
+    pub probes_started: Counter,
+    pub local_port_updates: Counter,
+    pub mapping_attempts: Counter,
+    pub mapping_failures: Counter,
+    pub external_address_updated: Counter,
+    pub upnp_probes: Counter,
+    pub upnp_probes_failed: Counter,
+    pub upnp_available: Counter,
+    pub upnp_gateway_updated: Counter,
+    pub pcp_probes: Counter,
+    pub pcp_available: Counter,
 }
Expand description

Enum of metrics for the module

-

Fields§

§probes_started: Counter§local_port_updates: Counter§mapping_attempts: Counter§mapping_failures: Counter§external_address_updated: Counter§upnp_probes: Counter§upnp_probes_failed: Counter§upnp_available: Counter§upnp_gateway_updated: Counter§pcp_probes: Counter§pcp_available: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§probes_started: Counter§local_port_updates: Counter§mapping_attempts: Counter§mapping_failures: Counter§external_address_updated: Counter§upnp_probes: Counter§upnp_probes_failed: Counter§upnp_available: Counter§upnp_gateway_updated: Counter§pcp_probes: Counter§pcp_available: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/metrics/struct.RelayMetrics.html b/pr/2583/docs/iroh/net/metrics/struct.RelayMetrics.html index 384f54ea48..87f95fb826 100644 --- a/pr/2583/docs/iroh/net/metrics/struct.RelayMetrics.html +++ b/pr/2583/docs/iroh/net/metrics/struct.RelayMetrics.html @@ -1,46 +1,46 @@ RelayMetrics in iroh::net::metrics - Rust

Struct iroh::net::metrics::RelayMetrics

source ·
pub struct RelayMetrics {
Show 19 fields - pub bytes_sent: Counter, - pub bytes_recv: Counter, - pub send_packets_sent: Counter, - pub send_packets_recv: Counter, - pub send_packets_dropped: Counter, - pub disco_packets_sent: Counter, - pub disco_packets_recv: Counter, - pub disco_packets_dropped: Counter, - pub other_packets_sent: Counter, - pub other_packets_recv: Counter, - pub other_packets_dropped: Counter, - pub got_ping: Counter, - pub sent_pong: Counter, - pub unknown_frames: Counter, - pub accepts: Counter, - pub disconnects: Counter, - pub unique_client_keys: Counter, - pub websocket_accepts: Counter, - pub derp_accepts: Counter, + pub bytes_sent: Counter, + pub bytes_recv: Counter, + pub send_packets_sent: Counter, + pub send_packets_recv: Counter, + pub send_packets_dropped: Counter, + pub disco_packets_sent: Counter, + pub disco_packets_recv: Counter, + pub disco_packets_dropped: Counter, + pub other_packets_sent: Counter, + pub other_packets_recv: Counter, + pub other_packets_dropped: Counter, + pub got_ping: Counter, + pub sent_pong: Counter, + pub unknown_frames: Counter, + pub accepts: Counter, + pub disconnects: Counter, + pub unique_client_keys: Counter, + pub websocket_accepts: Counter, + pub derp_accepts: Counter,
}
Expand description

Metrics tracked for the relay server

-

Fields§

§bytes_sent: Counter

Bytes sent from a FrameType::SendPacket

-
§bytes_recv: Counter

Bytes received from a FrameType::SendPacket

-
§send_packets_sent: Counter

FrameType::SendPacket sent, that are not disco messages

-
§send_packets_recv: Counter

FrameType::SendPacket received, that are not disco messages

-
§send_packets_dropped: Counter

FrameType::SendPacket dropped, that are not disco messages

-
§disco_packets_sent: Counter

FrameType::SendPacket sent that are disco messages

-
§disco_packets_recv: Counter

FrameType::SendPacket received that are disco messages

-
§disco_packets_dropped: Counter

FrameType::SendPacket dropped that are disco messages

-
§other_packets_sent: Counter

Packets of other FrameTypes sent

-
§other_packets_recv: Counter

Packets of other FrameTypes received

-
§other_packets_dropped: Counter

Packets of other FrameTypes dropped

-
§got_ping: Counter

Number of FrameType::Pings received

-
§sent_pong: Counter

Number of FrameType::Pongs sent

-
§unknown_frames: Counter

Number of FrameType::Unknown received

-
§accepts: Counter

Number of connections we have accepted

-
§disconnects: Counter

Number of connections we have removed because of an error

-
§unique_client_keys: Counter

Number of unique client keys per day

-
§websocket_accepts: Counter

Number of accepted websocket connections

-
§derp_accepts: Counter

Number of accepted ‘iroh derp http’ connection upgrades

-

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§bytes_sent: Counter

Bytes sent from a FrameType::SendPacket

+
§bytes_recv: Counter

Bytes received from a FrameType::SendPacket

+
§send_packets_sent: Counter

FrameType::SendPacket sent, that are not disco messages

+
§send_packets_recv: Counter

FrameType::SendPacket received, that are not disco messages

+
§send_packets_dropped: Counter

FrameType::SendPacket dropped, that are not disco messages

+
§disco_packets_sent: Counter

FrameType::SendPacket sent that are disco messages

+
§disco_packets_recv: Counter

FrameType::SendPacket received that are disco messages

+
§disco_packets_dropped: Counter

FrameType::SendPacket dropped that are disco messages

+
§other_packets_sent: Counter

Packets of other FrameTypes sent

+
§other_packets_recv: Counter

Packets of other FrameTypes received

+
§other_packets_dropped: Counter

Packets of other FrameTypes dropped

+
§got_ping: Counter

Number of FrameType::Pings received

+
§sent_pong: Counter

Number of FrameType::Pongs sent

+
§unknown_frames: Counter

Number of FrameType::Unknown received

+
§accepts: Counter

Number of connections we have accepted

+
§disconnects: Counter

Number of connections we have removed because of an error

+
§unique_client_keys: Counter

Number of unique client keys per day

+
§websocket_accepts: Counter

Number of accepted websocket connections

+
§derp_accepts: Counter

Number of accepted ‘iroh derp http’ connection upgrades

+

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/netcheck/struct.Metrics.html b/pr/2583/docs/iroh/net/netcheck/struct.Metrics.html index 632a940361..7a38e5d1ca 100644 --- a/pr/2583/docs/iroh/net/netcheck/struct.Metrics.html +++ b/pr/2583/docs/iroh/net/netcheck/struct.Metrics.html @@ -1,15 +1,15 @@ Metrics in iroh::net::netcheck - Rust

Struct iroh::net::netcheck::Metrics

source ·
pub struct Metrics {
-    pub stun_packets_dropped: Counter,
-    pub stun_packets_sent_ipv4: Counter,
-    pub stun_packets_sent_ipv6: Counter,
-    pub stun_packets_recv_ipv4: Counter,
-    pub stun_packets_recv_ipv6: Counter,
-    pub reports: Counter,
-    pub reports_full: Counter,
+    pub stun_packets_dropped: Counter,
+    pub stun_packets_sent_ipv4: Counter,
+    pub stun_packets_sent_ipv6: Counter,
+    pub stun_packets_recv_ipv4: Counter,
+    pub stun_packets_recv_ipv6: Counter,
+    pub reports: Counter,
+    pub reports_full: Counter,
 }
Expand description

Enum of metrics for the module

-

Fields§

§stun_packets_dropped: Counter§stun_packets_sent_ipv4: Counter§stun_packets_sent_ipv6: Counter§stun_packets_recv_ipv4: Counter§stun_packets_recv_ipv6: Counter§reports: Counter§reports_full: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§stun_packets_dropped: Counter§stun_packets_sent_ipv4: Counter§stun_packets_sent_ipv6: Counter§stun_packets_recv_ipv4: Counter§stun_packets_recv_ipv6: Counter§reports: Counter§reports_full: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/portmapper/struct.Metrics.html b/pr/2583/docs/iroh/net/portmapper/struct.Metrics.html index 348197eaf1..0cdfb2450d 100644 --- a/pr/2583/docs/iroh/net/portmapper/struct.Metrics.html +++ b/pr/2583/docs/iroh/net/portmapper/struct.Metrics.html @@ -1,19 +1,19 @@ Metrics in iroh::net::portmapper - Rust

Struct iroh::net::portmapper::Metrics

source ·
pub struct Metrics {
-    pub probes_started: Counter,
-    pub local_port_updates: Counter,
-    pub mapping_attempts: Counter,
-    pub mapping_failures: Counter,
-    pub external_address_updated: Counter,
-    pub upnp_probes: Counter,
-    pub upnp_probes_failed: Counter,
-    pub upnp_available: Counter,
-    pub upnp_gateway_updated: Counter,
-    pub pcp_probes: Counter,
-    pub pcp_available: Counter,
+    pub probes_started: Counter,
+    pub local_port_updates: Counter,
+    pub mapping_attempts: Counter,
+    pub mapping_failures: Counter,
+    pub external_address_updated: Counter,
+    pub upnp_probes: Counter,
+    pub upnp_probes_failed: Counter,
+    pub upnp_available: Counter,
+    pub upnp_gateway_updated: Counter,
+    pub pcp_probes: Counter,
+    pub pcp_available: Counter,
 }
Expand description

Enum of metrics for the module

-

Fields§

§probes_started: Counter§local_port_updates: Counter§mapping_attempts: Counter§mapping_failures: Counter§external_address_updated: Counter§upnp_probes: Counter§upnp_probes_failed: Counter§upnp_available: Counter§upnp_gateway_updated: Counter§pcp_probes: Counter§pcp_available: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§probes_started: Counter§local_port_updates: Counter§mapping_attempts: Counter§mapping_failures: Counter§external_address_updated: Counter§upnp_probes: Counter§upnp_probes_failed: Counter§upnp_available: Counter§upnp_gateway_updated: Counter§pcp_probes: Counter§pcp_available: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/relay/server/struct.Metrics.html b/pr/2583/docs/iroh/net/relay/server/struct.Metrics.html index e314cc8950..a74bfe20a9 100644 --- a/pr/2583/docs/iroh/net/relay/server/struct.Metrics.html +++ b/pr/2583/docs/iroh/net/relay/server/struct.Metrics.html @@ -1,46 +1,46 @@ Metrics in iroh::net::relay::server - Rust

Struct iroh::net::relay::server::Metrics

source ·
pub struct Metrics {
Show 19 fields - pub bytes_sent: Counter, - pub bytes_recv: Counter, - pub send_packets_sent: Counter, - pub send_packets_recv: Counter, - pub send_packets_dropped: Counter, - pub disco_packets_sent: Counter, - pub disco_packets_recv: Counter, - pub disco_packets_dropped: Counter, - pub other_packets_sent: Counter, - pub other_packets_recv: Counter, - pub other_packets_dropped: Counter, - pub got_ping: Counter, - pub sent_pong: Counter, - pub unknown_frames: Counter, - pub accepts: Counter, - pub disconnects: Counter, - pub unique_client_keys: Counter, - pub websocket_accepts: Counter, - pub derp_accepts: Counter, + pub bytes_sent: Counter, + pub bytes_recv: Counter, + pub send_packets_sent: Counter, + pub send_packets_recv: Counter, + pub send_packets_dropped: Counter, + pub disco_packets_sent: Counter, + pub disco_packets_recv: Counter, + pub disco_packets_dropped: Counter, + pub other_packets_sent: Counter, + pub other_packets_recv: Counter, + pub other_packets_dropped: Counter, + pub got_ping: Counter, + pub sent_pong: Counter, + pub unknown_frames: Counter, + pub accepts: Counter, + pub disconnects: Counter, + pub unique_client_keys: Counter, + pub websocket_accepts: Counter, + pub derp_accepts: Counter,
}
Expand description

Metrics tracked for the relay server

-

Fields§

§bytes_sent: Counter

Bytes sent from a FrameType::SendPacket

-
§bytes_recv: Counter

Bytes received from a FrameType::SendPacket

-
§send_packets_sent: Counter

FrameType::SendPacket sent, that are not disco messages

-
§send_packets_recv: Counter

FrameType::SendPacket received, that are not disco messages

-
§send_packets_dropped: Counter

FrameType::SendPacket dropped, that are not disco messages

-
§disco_packets_sent: Counter

FrameType::SendPacket sent that are disco messages

-
§disco_packets_recv: Counter

FrameType::SendPacket received that are disco messages

-
§disco_packets_dropped: Counter

FrameType::SendPacket dropped that are disco messages

-
§other_packets_sent: Counter

Packets of other FrameTypes sent

-
§other_packets_recv: Counter

Packets of other FrameTypes received

-
§other_packets_dropped: Counter

Packets of other FrameTypes dropped

-
§got_ping: Counter

Number of FrameType::Pings received

-
§sent_pong: Counter

Number of FrameType::Pongs sent

-
§unknown_frames: Counter

Number of FrameType::Unknown received

-
§accepts: Counter

Number of connections we have accepted

-
§disconnects: Counter

Number of connections we have removed because of an error

-
§unique_client_keys: Counter

Number of unique client keys per day

-
§websocket_accepts: Counter

Number of accepted websocket connections

-
§derp_accepts: Counter

Number of accepted ‘iroh derp http’ connection upgrades

-

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§bytes_sent: Counter

Bytes sent from a FrameType::SendPacket

+
§bytes_recv: Counter

Bytes received from a FrameType::SendPacket

+
§send_packets_sent: Counter

FrameType::SendPacket sent, that are not disco messages

+
§send_packets_recv: Counter

FrameType::SendPacket received, that are not disco messages

+
§send_packets_dropped: Counter

FrameType::SendPacket dropped, that are not disco messages

+
§disco_packets_sent: Counter

FrameType::SendPacket sent that are disco messages

+
§disco_packets_recv: Counter

FrameType::SendPacket received that are disco messages

+
§disco_packets_dropped: Counter

FrameType::SendPacket dropped that are disco messages

+
§other_packets_sent: Counter

Packets of other FrameTypes sent

+
§other_packets_recv: Counter

Packets of other FrameTypes received

+
§other_packets_dropped: Counter

Packets of other FrameTypes dropped

+
§got_ping: Counter

Number of FrameType::Pings received

+
§sent_pong: Counter

Number of FrameType::Pongs sent

+
§unknown_frames: Counter

Number of FrameType::Unknown received

+
§accepts: Counter

Number of connections we have accepted

+
§disconnects: Counter

Number of connections we have removed because of an error

+
§unique_client_keys: Counter

Number of unique client keys per day

+
§websocket_accepts: Counter

Number of accepted websocket connections

+
§derp_accepts: Counter

Number of accepted ‘iroh derp http’ connection upgrades

+

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/relay/struct.RelayUrl.html b/pr/2583/docs/iroh/net/relay/struct.RelayUrl.html index 0c6438a0b4..8f61f50448 100644 --- a/pr/2583/docs/iroh/net/relay/struct.RelayUrl.html +++ b/pr/2583/docs/iroh/net/relay/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh::net::relay - Rust

Struct iroh::net::relay::RelayUrl

source ·
pub struct RelayUrl(/* private fields */);
Expand description

A URL identifying a relay server.

+RelayUrl in iroh::net::relay - Rust

Struct iroh::net::relay::RelayUrl

pub struct RelayUrl(/* private fields */);
Expand description

A URL identifying a relay server.

This is but a wrapper around Url, with a few custom tweaks:

  • @@ -441,30 +441,30 @@
    §ExamplesPath::new_opt() returns None. (That is, if the percent-decoded path contains a NUL byte or, for a Windows path, is not UTF-8.)

    -

Trait Implementations§

source§

impl Clone for RelayUrl

source§

fn clone(&self) -> RelayUrl

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RelayUrl

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Deref for RelayUrl

Dereferences to the wrapped Url.

+

Trait Implementations§

§

impl Clone for RelayUrl

§

fn clone(&self) -> RelayUrl

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RelayUrl

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for RelayUrl

Dereferences to the wrapped Url.

Note that DerefMut is not implemented on purpose, so this type has more flexibility to change the inner later.

-
§

type Target = Url

The resulting type after dereferencing.
source§

fn deref(&self) -> &<RelayUrl as Deref>::Target

Dereferences the value.
source§

impl<'de> Deserialize<'de> for RelayUrl

§

type Target = Url

The resulting type after dereferencing.
§

fn deref(&self) -> &<RelayUrl as Deref>::Target

Dereferences the value.
§

impl<'de> Deserialize<'de> for RelayUrl

§

fn deserialize<__D>( __deserializer: __D ) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for RelayUrl

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<RelayUrl> for Url

source§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
source§

impl From<RelayUrlInfo> for RelayUrl

source§

fn from(value: RelayUrlInfo) -> RelayUrl

Converts to this type from the input type.
source§

impl From<Url> for RelayUrl

source§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
source§

impl FromStr for RelayUrl

Support for parsing strings directly.

+ __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Display for RelayUrl

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<RelayUrl> for Url

§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
source§

impl From<RelayUrlInfo> for RelayUrl

source§

fn from(value: RelayUrlInfo) -> RelayUrl

Converts to this type from the input type.
§

impl From<Url> for RelayUrl

§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
§

impl FromStr for RelayUrl

Support for parsing strings directly.

If you need more control over the error first create a Url and use RelayUrl::from instead.

-
§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for RelayUrl

source§

fn hash<__H>(&self, state: &mut __H)
where +
§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

Parses a string s to return a value of this type. Read more

§

impl Hash for RelayUrl

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for RelayUrl

source§

fn cmp(&self, other: &RelayUrl) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for RelayUrl

§

fn cmp(&self, other: &RelayUrl) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for RelayUrl

source§

fn eq(&self, other: &RelayUrl) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

§

impl PartialEq for RelayUrl

§

fn eq(&self, other: &RelayUrl) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for RelayUrl

source§

fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for RelayUrl

§

fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for RelayUrl

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for RelayUrl

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RelayUrl

source§

impl StructuralPartialEq for RelayUrl

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

§

impl Eq for RelayUrl

§

impl StructuralPartialEq for RelayUrl

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/struct.AddrInfo.html b/pr/2583/docs/iroh/net/struct.AddrInfo.html index 8d9a147e5b..77483d2169 100644 --- a/pr/2583/docs/iroh/net/struct.AddrInfo.html +++ b/pr/2583/docs/iroh/net/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh::net - Rust

Struct iroh::net::AddrInfo

source ·
pub struct AddrInfo {
+AddrInfo in iroh::net - Rust

Struct iroh::net::AddrInfo

pub struct AddrInfo {
     pub relay_url: Option<RelayUrl>,
     pub direct_addresses: BTreeSet<SocketAddr>,
 }
Expand description

Network paths to contact an iroh-net node.

@@ -7,26 +7,26 @@ other node, see NodeAddr for details.

Fields§

§relay_url: Option<RelayUrl>

The node’s home relay url.

§direct_addresses: BTreeSet<SocketAddr>

Socket addresses where the peer might be reached directly.

-

Implementations§

source§

impl AddrInfo

source

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

-
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

Implementations§

§

impl AddrInfo

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

+

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in ab AddrInfo received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-

Trait Implementations§

source§

impl Clone for AddrInfo

source§

fn clone(&self) -> AddrInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AddrInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for AddrInfo

source§

fn default() -> AddrInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AddrInfo

Trait Implementations§

§

impl Clone for AddrInfo

§

fn clone(&self) -> AddrInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for AddrInfo

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for AddrInfo

§

fn default() -> AddrInfo

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for AddrInfo

§

fn deserialize<__D>( __deserializer: __D ) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> AddrInfo

Converts to this type from the input type.
source§

impl Ord for AddrInfo

source§

fn cmp(&self, other: &AddrInfo) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> AddrInfo

Converts to this type from the input type.
§

impl Ord for AddrInfo

§

fn cmp(&self, other: &AddrInfo) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for AddrInfo

source§

fn eq(&self, other: &AddrInfo) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

§

impl PartialEq for AddrInfo

§

fn eq(&self, other: &AddrInfo) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AddrInfo

source§

fn partial_cmp(&self, other: &AddrInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for AddrInfo

§

fn partial_cmp(&self, other: &AddrInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for AddrInfo

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for AddrInfo

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AddrInfo

source§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for AddrInfo

§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/struct.NodeAddr.html b/pr/2583/docs/iroh/net/struct.NodeAddr.html index 67755432d7..83156c44fd 100644 --- a/pr/2583/docs/iroh/net/struct.NodeAddr.html +++ b/pr/2583/docs/iroh/net/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh::net - Rust

Struct iroh::net::NodeAddr

source ·
pub struct NodeAddr {
+NodeAddr in iroh::net - Rust

Struct iroh::net::NodeAddr

pub struct NodeAddr {
     pub node_id: PublicKey,
     pub info: AddrInfo,
 }
Expand description

Network-level addressing information for an iroh-net node.

@@ -25,38 +25,38 @@ whenever a connection to other nodes needs to be established.

Fields§

§node_id: PublicKey

The node’s identifier.

§info: AddrInfo

Addressing information to connect to Self::node_id.

-

Implementations§

source§

impl NodeAddr

source

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

-
source

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url to the node’s AddrInfo.

-
source

pub fn with_direct_addresses( +

Implementations§

§

impl NodeAddr

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

+

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url to the node’s AddrInfo.

+

pub fn with_direct_addresses( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

Adds the given direct addresses to the peer’s AddrInfo.

-
source

pub fn from_parts( +

pub fn from_parts( node_id: PublicKey, relay_url: Option<RelayUrl>, direct_addresses: Vec<SocketAddr> ) -> NodeAddr

Creates a new NodeAddr from its parts.

-
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in a NodeAddr received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-
source

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

-
source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

-

Trait Implementations§

source§

impl Clone for NodeAddr

source§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NodeAddr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NodeAddr

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

+

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

+

Trait Implementations§

§

impl Clone for NodeAddr

§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for NodeAddr

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NodeAddr

§

fn deserialize<__D>( __deserializer: __D ) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

source§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(info: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl Ord for NodeAddr

source§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(info: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
§

impl Ord for NodeAddr

§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for NodeAddr

source§

fn eq(&self, other: &NodeAddr) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

§

impl PartialEq for NodeAddr

§

fn eq(&self, other: &NodeAddr) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for NodeAddr

source§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for NodeAddr

§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for NodeAddr

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for NodeAddr

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NodeAddr

source§

impl StructuralPartialEq for NodeAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for NodeAddr

§

impl StructuralPartialEq for NodeAddr

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/ticket/struct.NodeTicket.html b/pr/2583/docs/iroh/net/ticket/struct.NodeTicket.html index dfb6d17abd..4bf7060540 100644 --- a/pr/2583/docs/iroh/net/ticket/struct.NodeTicket.html +++ b/pr/2583/docs/iroh/net/ticket/struct.NodeTicket.html @@ -1,17 +1,17 @@ -NodeTicket in iroh::net::ticket - Rust

Struct iroh::net::ticket::NodeTicket

source ·
pub struct NodeTicket { /* private fields */ }
Expand description

A token containing everything to get a file from the provider.

+NodeTicket in iroh::net::ticket - Rust

Struct iroh::net::ticket::NodeTicket

pub struct NodeTicket { /* private fields */ }
Expand description

A token containing everything to get a file from the provider.

It is a single item which can be easily serialized and deserialized.

-

Implementations§

source§

impl NodeTicket

source

pub fn new(node: NodeAddr) -> Result<NodeTicket, Error>

Creates a new ticket.

-
source

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

-

Trait Implementations§

source§

impl Clone for NodeTicket

source§

fn clone(&self) -> NodeTicket

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NodeTicket

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NodeTicket

Implementations§

§

impl NodeTicket

pub fn new(node: NodeAddr) -> Result<NodeTicket, Error>

Creates a new ticket.

+

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

+

Trait Implementations§

§

impl Clone for NodeTicket

§

fn clone(&self) -> NodeTicket

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for NodeTicket

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NodeTicket

§

fn deserialize<D>( deserializer: D ) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for NodeTicket

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl FromStr for NodeTicket

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<NodeTicket, <NodeTicket as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for NodeTicket

source§

fn eq(&self, other: &NodeTicket) -> bool

This method tests for self and other values to be equal, and is used + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for NodeTicket

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl FromStr for NodeTicket

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<NodeTicket, <NodeTicket as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl PartialEq for NodeTicket

§

fn eq(&self, other: &NodeTicket) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NodeTicket

source§

fn serialize<S>( +sufficient, and should not be overridden without very good reason.

§

impl Serialize for NodeTicket

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Ticket for NodeTicket

source§

const KIND: &'static str = "node"

String prefix describing the kind of iroh ticket. Read more
source§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
source§

fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

Deserialize from the base32 string representation bytes.
source§

fn serialize(&self) -> String

Serialize to string.
source§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
source§

impl Eq for NodeTicket

source§

impl StructuralPartialEq for NodeTicket

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Ticket for NodeTicket

§

const KIND: &'static str = "node"

String prefix describing the kind of iroh ticket. Read more
§

fn to_bytes(&self) -> Vec<u8>

Serialize to bytes used in the base32 string representation.
§

fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

Deserialize from the base32 string representation bytes.
§

fn serialize(&self) -> String

Serialize to string.
§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
§

impl Eq for NodeTicket

§

impl StructuralPartialEq for NodeTicket

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh/net/type.NodeId.html b/pr/2583/docs/iroh/net/type.NodeId.html index 73f31470f2..4a5d0262fc 100644 --- a/pr/2583/docs/iroh/net/type.NodeId.html +++ b/pr/2583/docs/iroh/net/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh::net - Rust

Type Alias iroh::net::NodeId

source ·
pub type NodeId = PublicKey;
Expand description

The identifier for a node in the (iroh) network.

+NodeId in iroh::net - Rust

Type Alias iroh::net::NodeId

pub type NodeId = PublicKey;
Expand description

The identifier for a node in the (iroh) network.

Each node in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify a node. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific node only.

diff --git a/pr/2583/docs/iroh_blobs/downloader/struct.DownloadRequest.html b/pr/2583/docs/iroh_blobs/downloader/struct.DownloadRequest.html index 08d3670469..b34176fb1d 100644 --- a/pr/2583/docs/iroh_blobs/downloader/struct.DownloadRequest.html +++ b/pr/2583/docs/iroh_blobs/downloader/struct.DownloadRequest.html @@ -1,7 +1,7 @@ DownloadRequest in iroh_blobs::downloader - Rust

Struct iroh_blobs::downloader::DownloadRequest

source ·
pub struct DownloadRequest { /* private fields */ }
Expand description

A download request.

Implementations§

source§

impl DownloadRequest

source

pub fn new( resource: impl Into<DownloadKind>, - nodes: impl IntoIterator<Item = impl Into<NodeAddr>> + nodes: impl IntoIterator<Item = impl Into<NodeAddr>> ) -> Self

Create a new download request.

It is the responsibility of the caller to ensure that the data is tagged either with a temp tag or with a persistent tag to make sure the data is not garbage collected during diff --git a/pr/2583/docs/iroh_blobs/downloader/struct.Downloader.html b/pr/2583/docs/iroh_blobs/downloader/struct.Downloader.html index 11029b2de8..b7208d0fde 100644 --- a/pr/2583/docs/iroh_blobs/downloader/struct.Downloader.html +++ b/pr/2583/docs/iroh_blobs/downloader/struct.Downloader.html @@ -11,7 +11,7 @@ S: Store,

Create a new Downloader with custom ConcurrencyLimits and RetryConfig.

source

pub async fn queue(&self, request: DownloadRequest) -> DownloadHandle

Queue a download.

source

pub async fn cancel(&self, handle: DownloadHandle)

Cancel a download.

-
source

pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)

Declare that certains nodes can be used to download a hash.

+
source

pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)

Declare that certains nodes can be used to download a hash.

Note that this does not start a download, but only provides new nodes to already queued downloads. Use Self::queue to queue a download.

Trait Implementations§

source§

impl Clone for Downloader

source§

fn clone(&self) -> Downloader

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Downloader

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2583/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2583/docs/iroh_blobs/downloader/trait.Dialer.html index 6f4034411a..91be9fbea3 100644 --- a/pr/2583/docs/iroh_blobs/downloader/trait.Dialer.html +++ b/pr/2583/docs/iroh_blobs/downloader/trait.Dialer.html @@ -1,13 +1,13 @@ -Dialer in iroh_blobs::downloader - Rust

Trait iroh_blobs::downloader::Dialer

source ·
pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust

Trait iroh_blobs::downloader::Dialer

source ·
pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
     type Connection: Clone;
 
     // Required methods
-    fn queue_dial(&mut self, node_id: NodeId);
+    fn queue_dial(&mut self, node_id: NodeId);
     fn pending_count(&self) -> usize;
-    fn is_pending(&self, node: NodeId) -> bool;
+    fn is_pending(&self, node: NodeId) -> bool;
 }
Expand description

Trait modeling a dialer. This allows for IO-less testing.

Required Associated Types§

source

type Connection: Clone

Type of connections returned by the Dialer.

-

Required Methods§

source

fn queue_dial(&mut self, node_id: NodeId)

Dial a node.

+

Required Methods§

source

fn queue_dial(&mut self, node_id: NodeId)

Dial a node.

source

fn pending_count(&self) -> usize

Get the number of dialing nodes.

-
source

fn is_pending(&self, node: NodeId) -> bool

Check if a node is being dialed.

-

Implementations on Foreign Types§

source§

impl Dialer for Dialer

§

type Connection = Connection

source§

fn queue_dial(&mut self, node_id: NodeId)

source§

fn pending_count(&self) -> usize

source§

fn is_pending(&self, node: NodeId) -> bool

Implementors§

\ No newline at end of file +

source

fn is_pending(&self, node: NodeId) -> bool

Check if a node is being dialed.

+

Implementations on Foreign Types§

source§

impl Dialer for Dialer

§

type Connection = Connection

source§

fn queue_dial(&mut self, node_id: NodeId)

source§

fn pending_count(&self) -> usize

source§

fn is_pending(&self, node: NodeId) -> bool

Implementors§

\ No newline at end of file diff --git a/pr/2583/docs/iroh_blobs/enum.BlobFormat.html b/pr/2583/docs/iroh_blobs/enum.BlobFormat.html index db427d246b..1d54e03ff2 100644 --- a/pr/2583/docs/iroh_blobs/enum.BlobFormat.html +++ b/pr/2583/docs/iroh_blobs/enum.BlobFormat.html @@ -1,30 +1,30 @@ -BlobFormat in iroh_blobs - Rust

Enum iroh_blobs::BlobFormat

source ·
pub enum BlobFormat {
+BlobFormat in iroh_blobs - Rust

Enum iroh_blobs::BlobFormat

pub enum BlobFormat {
     Raw,
     HashSeq,
 }
Expand description

A format identifier

Variants§

§

Raw

Raw blob

§

HashSeq

A sequence of BLAKE3 hashes

-

Implementations§

source§

impl BlobFormat

source

pub const fn is_raw(&self) -> bool

Is raw format

-
source

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

-

Trait Implementations§

source§

impl Clone for BlobFormat

source§

fn clone(&self) -> BlobFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlobFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for BlobFormat

source§

fn default() -> BlobFormat

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlobFormat

Implementations§

§

impl BlobFormat

pub const fn is_raw(&self) -> bool

Is raw format

+

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

+

Trait Implementations§

§

impl Clone for BlobFormat

§

fn clone(&self) -> BlobFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for BlobFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for BlobFormat

§

fn default() -> BlobFormat

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for BlobFormat

§

fn deserialize<__D>( __deserializer: __D ) -> Result<BlobFormat, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for BlobFormat

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Hash for BlobFormat

source§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for BlobFormat

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for BlobFormat

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl MaxSize for BlobFormat

source§

const POSTCARD_MAX_SIZE: usize = 1usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for BlobFormat

source§

fn cmp(&self, other: &BlobFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl MaxSize for BlobFormat

§

const POSTCARD_MAX_SIZE: usize = 1usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for BlobFormat

§

fn cmp(&self, other: &BlobFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for BlobFormat

source§

fn eq(&self, other: &BlobFormat) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
§

impl PartialEq for BlobFormat

§

fn eq(&self, other: &BlobFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for BlobFormat

source§

fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for BlobFormat

§

fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for BlobFormat

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for BlobFormat

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlobFormat

source§

impl Eq for BlobFormat

source§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Copy for BlobFormat

§

impl Eq for BlobFormat

§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2583/docs/iroh_blobs/export/enum.ExportProgress.html index 75c1926b4e..2cb16cbc51 100644 --- a/pr/2583/docs/iroh_blobs/export/enum.ExportProgress.html +++ b/pr/2583/docs/iroh_blobs/export/enum.ExportProgress.html @@ -14,7 +14,7 @@ id: u64, }, AllDone, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress events for an export operation

Variants§

§

Found

The download part is done for this id, we are now exporting the data to the specified out path.

@@ -30,7 +30,7 @@
§

Done

We finished exporting a blob

Fields

§id: u64

Unique id of the entry that is being exported.

§

AllDone

We are done with the whole operation.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

Trait Implementations§

source§

impl Clone for ExportProgress

source§

fn clone(&self) -> ExportProgress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExportProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ExportProgress

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ExportProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2583/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2583/docs/iroh_blobs/get/db/enum.DownloadProgress.html index a4017c77d6..0f6566a724 100644 --- a/pr/2583/docs/iroh_blobs/get/db/enum.DownloadProgress.html +++ b/pr/2583/docs/iroh_blobs/get/db/enum.DownloadProgress.html @@ -25,7 +25,7 @@ id: u64, }, AllDone(Stats), - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the get operation.

Variants§

§

InitialState(TransferState)

Initial state if subscribing to a running or queued transfer.

§

FoundLocal

Data was found locally.

@@ -51,7 +51,7 @@

Fields

§id: u64

The unique id of the entry.

§

AllDone(Stats)

All operations finished.

This will be the last message in the stream.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

Trait Implementations§

source§

impl Clone for DownloadProgress

source§

fn clone(&self) -> DownloadProgress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DownloadProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for DownloadProgress

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for DownloadProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/pr/2583/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2583/docs/iroh_blobs/metrics/struct.Metrics.html index e20ee637f7..07018ef507 100644 --- a/pr/2583/docs/iroh_blobs/metrics/struct.Metrics.html +++ b/pr/2583/docs/iroh_blobs/metrics/struct.Metrics.html @@ -1,20 +1,20 @@ Metrics in iroh_blobs::metrics - Rust

Struct iroh_blobs::metrics::Metrics

source ·
pub struct Metrics {
-    pub download_bytes_total: Counter,
-    pub download_time_total: Counter,
-    pub downloads_success: Counter,
-    pub downloads_error: Counter,
-    pub downloads_notfound: Counter,
-    pub downloader_tick_main: Counter,
-    pub downloader_tick_connection_ready: Counter,
-    pub downloader_tick_message_received: Counter,
-    pub downloader_tick_transfer_completed: Counter,
-    pub downloader_tick_transfer_failed: Counter,
-    pub downloader_tick_retry_node: Counter,
-    pub downloader_tick_goodbye_node: Counter,
+    pub download_bytes_total: Counter,
+    pub download_time_total: Counter,
+    pub downloads_success: Counter,
+    pub downloads_error: Counter,
+    pub downloads_notfound: Counter,
+    pub downloader_tick_main: Counter,
+    pub downloader_tick_connection_ready: Counter,
+    pub downloader_tick_message_received: Counter,
+    pub downloader_tick_transfer_completed: Counter,
+    pub downloader_tick_transfer_failed: Counter,
+    pub downloader_tick_retry_node: Counter,
+    pub downloader_tick_goodbye_node: Counter,
 }
Expand description

Enum of metrics for the module

-

Fields§

§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2583/docs/iroh_blobs/provider/enum.AddProgress.html index efdbfbac83..0f1b217f59 100644 --- a/pr/2583/docs/iroh_blobs/provider/enum.AddProgress.html +++ b/pr/2583/docs/iroh_blobs/provider/enum.AddProgress.html @@ -17,7 +17,7 @@ format: BlobFormat, tag: Tag, }, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the add operation.

Variants§

§

Found

An item was found with name name, from now on referred to via id

Fields

§id: u64

A new unique id for this entry.

@@ -33,7 +33,7 @@

Fields

§hash: Hash

The hash of the created data.

§format: BlobFormat

The format of the added data.

§tag: Tag

The tag of the added data.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

Trait Implementations§

source§

impl Debug for AddProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for AddProgress

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for AddProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/pr/2583/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2583/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html index fbaced9a62..c6c87fc652 100644 --- a/pr/2583/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html +++ b/pr/2583/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html @@ -6,7 +6,7 @@ level: ReportLevel, }, Done, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the validate operation

Variants§

§

Start

Consistency check started

§

Update

Consistency check update

@@ -14,7 +14,7 @@
§entry: Option<Hash>

The entry this message is about, if any

§level: ReportLevel

The level of the message

§

Done

Consistency check ended

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

Trait Implementations§

source§

impl Debug for ConsistencyCheckProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ConsistencyCheckProgress

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ConsistencyCheckProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2583/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2583/docs/iroh_blobs/store/enum.ValidateProgress.html index cbf150ca6b..169389ef27 100644 --- a/pr/2583/docs/iroh_blobs/store/enum.ValidateProgress.html +++ b/pr/2583/docs/iroh_blobs/store/enum.ValidateProgress.html @@ -31,7 +31,7 @@ ranges: RangeSpec, }, AllDone, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the validate operation

Variants§

§

Starting

started validating

Fields

§total: u64

The total number of entries to validate

@@ -62,7 +62,7 @@

Fields

§id: u64

The unique id of the entry.

§ranges: RangeSpec

Available ranges.

§

AllDone

We are done with the whole operation.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

Trait Implementations§

source§

impl Debug for ValidateProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ValidateProgress

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ValidateProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2583/docs/iroh_blobs/struct.Hash.html b/pr/2583/docs/iroh_blobs/struct.Hash.html index 9754b76af5..bb62d940a7 100644 --- a/pr/2583/docs/iroh_blobs/struct.Hash.html +++ b/pr/2583/docs/iroh_blobs/struct.Hash.html @@ -1,36 +1,36 @@ -Hash in iroh_blobs - Rust

Struct iroh_blobs::Hash

source ·
pub struct Hash(/* private fields */);
Expand description

Hash type used throughout.

-

Implementations§

source§

impl Hash

source

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

-
source

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

-
source

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

-
source

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

-
source

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +Hash in iroh_blobs - Rust

Struct iroh_blobs::Hash

pub struct Hash(/* private fields */);
Expand description

Hash type used throughout.

+

Implementations§

§

impl Hash

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

+

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

+

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

+

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

+

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

+

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the hash.

-

Trait Implementations§

source§

impl AsRef<[u8]> for Hash

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<[u8]> for Hash

source§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
source§

impl Borrow<[u8; 32]> for Hash

source§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
source§

impl Clone for Hash

source§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Hash

Trait Implementations§

§

impl AsRef<[u8]> for Hash

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Borrow<[u8]> for Hash

§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
§

impl Borrow<[u8; 32]> for Hash

§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
§

impl Clone for Hash

§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Hash

§

fn deserialize<D>( deserializer: D ) -> Result<Hash, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&[u8; 32]> for Hash

source§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<[u8; 32]> for Hash

source§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for [u8; 32]

source§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

fn from_iter<T: IntoIterator<Item = Hash>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for Hash

source§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<&[u8; 32]> for Hash

§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<[u8; 32]> for Hash

§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

fn from_iter<T: IntoIterator<Item = Hash>>(iter: T) -> Self

Creates a value from an iterator. Read more
§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for Hash

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Key for Hash

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl MaxSize for Hash

source§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for Hash

source§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Key for Hash

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl MaxSize for Hash

§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for Hash

§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Hash

source§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

§

impl PartialEq for Hash

§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Hash

source§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Hash

§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for Hash

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for Hash

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where Hash: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <Hash as Value>::SelfType<'b> ) -> <Hash as Value>::AsBytes<'a>
where 'b: 'a, - Hash: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type

source§

impl Copy for Hash

source§

impl Eq for Hash

source§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where + Hash: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type

§

impl Copy for Hash

§

impl Eq for Hash

§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where diff --git a/pr/2583/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2583/docs/iroh_blobs/struct.HashAndFormat.html index 80ceabd49d..082b13dcc5 100644 --- a/pr/2583/docs/iroh_blobs/struct.HashAndFormat.html +++ b/pr/2583/docs/iroh_blobs/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh_blobs - Rust

Struct iroh_blobs::HashAndFormat

source ·
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust

Struct iroh_blobs::HashAndFormat

pub struct HashAndFormat {
     pub hash: Hash,
     pub format: BlobFormat,
 }
Expand description

A hash and format pair

Fields§

§hash: Hash

The hash

§format: BlobFormat

The format

-

Implementations§

source§

impl HashAndFormat

source

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

-
source

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

-
source

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

-

Trait Implementations§

source§

impl Clone for HashAndFormat

source§

fn clone(&self) -> HashAndFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for HashAndFormat

Implementations§

§

impl HashAndFormat

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

+

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

+

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

+

Trait Implementations§

§

impl Clone for HashAndFormat

§

fn clone(&self) -> HashAndFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for HashAndFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for HashAndFormat

§

fn deserialize<D>( deserializer: D ) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<DownloadKind> for HashAndFormat

source§

fn from(value: DownloadKind) -> Self

Converts to this type from the input type.
source§

impl From<HashAndFormat> for DownloadKind

source§

fn from(value: HashAndFormat) -> Self

Converts to this type from the input type.
source§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for HashAndFormat

source§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for HashAndFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<DownloadKind> for HashAndFormat

source§

fn from(value: DownloadKind) -> Self

Converts to this type from the input type.
source§

impl From<HashAndFormat> for DownloadKind

source§

fn from(value: HashAndFormat) -> Self

Converts to this type from the input type.
§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for HashAndFormat

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl MaxSize for HashAndFormat

source§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this -type can have, in bytes.
source§

impl Ord for HashAndFormat

source§

fn cmp(&self, other: &HashAndFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl MaxSize for HashAndFormat

§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this +type can have, in bytes.
§

impl Ord for HashAndFormat

§

fn cmp(&self, other: &HashAndFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for HashAndFormat

source§

fn eq(&self, other: &HashAndFormat) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for HashAndFormat

§

fn eq(&self, other: &HashAndFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for HashAndFormat

source§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for HashAndFormat

§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Serialize for HashAndFormat

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for HashAndFormat

§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where HashAndFormat: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
source§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

§

fn as_bytes<'a, 'b>( value: &'a <HashAndFormat as Value>::SelfType<'b> ) -> <HashAndFormat as Value>::AsBytes<'a>
where 'b: 'a, - HashAndFormat: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type

source§

impl Copy for HashAndFormat

source§

impl Eq for HashAndFormat

source§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + HashAndFormat: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for HashAndFormat

§

impl Eq for HashAndFormat

§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh_docs/engine/struct.Engine.html b/pr/2583/docs/iroh_docs/engine/struct.Engine.html index 871ca8a7ce..618a9d6f37 100644 --- a/pr/2583/docs/iroh_docs/engine/struct.Engine.html +++ b/pr/2583/docs/iroh_docs/engine/struct.Engine.html @@ -10,7 +10,7 @@
§default_author: Arc<DefaultAuthor>

The persistent default author for this engine.

Implementations§

source§

impl Engine

source

pub async fn spawn<B: Store>( endpoint: Endpoint, - gossip: Gossip, + gossip: Gossip, replica_store: Store, bao_store: B, downloader: Downloader, diff --git a/pr/2583/docs/iroh_docs/struct.AuthorId.html b/pr/2583/docs/iroh_docs/struct.AuthorId.html index 5a3d69a670..5f5285e10c 100644 --- a/pr/2583/docs/iroh_docs/struct.AuthorId.html +++ b/pr/2583/docs/iroh_docs/struct.AuthorId.html @@ -156,6 +156,6 @@ S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

\ No newline at end of file diff --git a/pr/2583/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2583/docs/iroh_docs/struct.AuthorPublicKey.html index 9c4875b166..d8afaf17b8 100644 --- a/pr/2583/docs/iroh_docs/struct.AuthorPublicKey.html +++ b/pr/2583/docs/iroh_docs/struct.AuthorPublicKey.html @@ -148,6 +148,6 @@ S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

\ No newline at end of file diff --git a/pr/2583/docs/iroh_docs/struct.NamespaceId.html b/pr/2583/docs/iroh_docs/struct.NamespaceId.html index addc62509a..04ea4a2abd 100644 --- a/pr/2583/docs/iroh_docs/struct.NamespaceId.html +++ b/pr/2583/docs/iroh_docs/struct.NamespaceId.html @@ -156,6 +156,6 @@ S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

\ No newline at end of file diff --git a/pr/2583/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2583/docs/iroh_docs/struct.NamespacePublicKey.html index 04462e10fa..cdad5df27b 100644 --- a/pr/2583/docs/iroh_docs/struct.NamespacePublicKey.html +++ b/pr/2583/docs/iroh_docs/struct.NamespacePublicKey.html @@ -147,6 +147,6 @@ S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

source§

impl<T> PeerIdentity for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> PeerIdentity for T

source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

\ No newline at end of file diff --git a/pr/2583/docs/iroh_gossip/dispatcher/enum.GossipEvent.html b/pr/2583/docs/iroh_gossip/dispatcher/enum.GossipEvent.html index cced7fb316..aa8d1350a5 100644 --- a/pr/2583/docs/iroh_gossip/dispatcher/enum.GossipEvent.html +++ b/pr/2583/docs/iroh_gossip/dispatcher/enum.GossipEvent.html @@ -1,14 +1,14 @@ GossipEvent in iroh_gossip::dispatcher - Rust

Enum iroh_gossip::dispatcher::GossipEvent

source ·
pub enum GossipEvent {
-    NeighborUp(NodeId),
-    NeighborDown(NodeId),
+    NeighborUp(NodeId),
+    NeighborDown(NodeId),
     Received(Message),
 }
Expand description

Gossip event An event to be emitted to the application for a particular topic.

-

Variants§

§

NeighborUp(NodeId)

We have a new, direct neighbor in the swarm membership layer for this topic

-
§

NeighborDown(NodeId)

We dropped direct neighbor in the swarm membership layer for this topic

+

Variants§

§

NeighborUp(NodeId)

We have a new, direct neighbor in the swarm membership layer for this topic

+
§

NeighborDown(NodeId)

We dropped direct neighbor in the swarm membership layer for this topic

§

Received(Message)

A gossip message was received for this topic

Trait Implementations§

source§

impl Clone for GossipEvent

source§

fn clone(&self) -> GossipEvent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GossipEvent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GossipEvent

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl Ord for GossipEvent

source§

fn cmp(&self, other: &GossipEvent) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl Ord for GossipEvent

source§

fn cmp(&self, other: &GossipEvent) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for GossipEvent

source§

fn eq(&self, other: &GossipEvent) -> bool

This method tests for self and other values to be equal, and is used diff --git a/pr/2583/docs/iroh_gossip/dispatcher/struct.GossipDispatcher.html b/pr/2583/docs/iroh_gossip/dispatcher/struct.GossipDispatcher.html index e1abc9f4fa..d790fb8da4 100644 --- a/pr/2583/docs/iroh_gossip/dispatcher/struct.GossipDispatcher.html +++ b/pr/2583/docs/iroh_gossip/dispatcher/struct.GossipDispatcher.html @@ -5,7 +5,7 @@ topic: TopicId, options: SubscribeOptions, updates: Box<dyn Stream<Item = Command> + Send + Sync + Unpin + 'static> -) -> impl Stream<Item = RpcResult<Event>> + Unpin

Subscribe to a gossip topic.

+) -> impl Stream<Item = RpcResult<Event>> + Unpin

Subscribe to a gossip topic.

Trait Implementations§

source§

impl Clone for GossipDispatcher

source§

fn clone(&self) -> GossipDispatcher

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GossipDispatcher

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh_gossip/dispatcher/struct.Message.html b/pr/2583/docs/iroh_gossip/dispatcher/struct.Message.html index 6cbd3d761d..e95a99dda9 100644 --- a/pr/2583/docs/iroh_gossip/dispatcher/struct.Message.html +++ b/pr/2583/docs/iroh_gossip/dispatcher/struct.Message.html @@ -1,12 +1,12 @@ Message in iroh_gossip::dispatcher - Rust

Struct iroh_gossip::dispatcher::Message

source ·
pub struct Message {
     pub content: Bytes,
     pub scope: DeliveryScope,
-    pub delivered_from: NodeId,
+    pub delivered_from: NodeId,
 }
Expand description

A gossip message

Fields§

§content: Bytes

The content of the message

§scope: DeliveryScope

The scope of the message. This tells us if the message is from a direct neighbor or actual gossip.

-
§delivered_from: NodeId

The node that delivered the message. This is not the same as the original author.

+
§delivered_from: NodeId

The node that delivered the message. This is not the same as the original author.

Trait Implementations§

source§

impl Clone for Message

source§

fn clone(&self) -> Message

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Message

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Message

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Ord for Message

source§

fn cmp(&self, other: &Message) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where diff --git a/pr/2583/docs/iroh_gossip/dispatcher/struct.SubscribeOptions.html b/pr/2583/docs/iroh_gossip/dispatcher/struct.SubscribeOptions.html index 98bace3120..c866f9cbf7 100644 --- a/pr/2583/docs/iroh_gossip/dispatcher/struct.SubscribeOptions.html +++ b/pr/2583/docs/iroh_gossip/dispatcher/struct.SubscribeOptions.html @@ -1,8 +1,8 @@ SubscribeOptions in iroh_gossip::dispatcher - Rust

Struct iroh_gossip::dispatcher::SubscribeOptions

source ·
pub struct SubscribeOptions {
-    pub bootstrap: BTreeSet<PublicKey>,
+    pub bootstrap: BTreeSet<PublicKey>,
     pub subscription_capacity: usize,
 }
Expand description

Join a gossip topic

-

Fields§

§bootstrap: BTreeSet<PublicKey>

The initial bootstrap nodes

+

Fields§

§bootstrap: BTreeSet<PublicKey>

The initial bootstrap nodes

§subscription_capacity: usize

The maximum number of messages that can be buffered in a subscription.

If this limit is reached, the subscriber will receive a Lagged response, the message will be dropped, and the subscriber will be closed.

diff --git a/pr/2583/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2583/docs/iroh_gossip/metrics/struct.Metrics.html index 94acb63969..c9aa906e8f 100644 --- a/pr/2583/docs/iroh_gossip/metrics/struct.Metrics.html +++ b/pr/2583/docs/iroh_gossip/metrics/struct.Metrics.html @@ -1,26 +1,26 @@ Metrics in iroh_gossip::metrics - Rust

Struct iroh_gossip::metrics::Metrics

source ·
pub struct Metrics {
Show 18 fields - pub msgs_ctrl_sent: Counter, - pub msgs_ctrl_recv: Counter, - pub msgs_data_sent: Counter, - pub msgs_data_recv: Counter, - pub msgs_data_sent_size: Counter, - pub msgs_data_recv_size: Counter, - pub msgs_ctrl_sent_size: Counter, - pub msgs_ctrl_recv_size: Counter, - pub neighbor_up: Counter, - pub neighbor_down: Counter, - pub actor_tick_main: Counter, - pub actor_tick_rx: Counter, - pub actor_tick_endpoint: Counter, - pub actor_tick_dialer: Counter, - pub actor_tick_dialer_success: Counter, - pub actor_tick_dialer_failure: Counter, - pub actor_tick_in_event_rx: Counter, - pub actor_tick_timers: Counter, + pub msgs_ctrl_sent: Counter, + pub msgs_ctrl_recv: Counter, + pub msgs_data_sent: Counter, + pub msgs_data_recv: Counter, + pub msgs_data_sent_size: Counter, + pub msgs_data_recv_size: Counter, + pub msgs_ctrl_sent_size: Counter, + pub msgs_ctrl_recv_size: Counter, + pub neighbor_up: Counter, + pub neighbor_down: Counter, + pub actor_tick_main: Counter, + pub actor_tick_rx: Counter, + pub actor_tick_endpoint: Counter, + pub actor_tick_dialer: Counter, + pub actor_tick_dialer_success: Counter, + pub actor_tick_dialer_failure: Counter, + pub actor_tick_in_event_rx: Counter, + pub actor_tick_timers: Counter,
}
Expand description

Enum of metrics for the module

-

Fields§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where +

Fields§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -Only records if this metric is registered in the global registry.
§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

source§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2583/docs/iroh_gossip/net/struct.Gossip.html b/pr/2583/docs/iroh_gossip/net/struct.Gossip.html index 0e13977df3..ec4771984d 100644 --- a/pr/2583/docs/iroh_gossip/net/struct.Gossip.html +++ b/pr/2583/docs/iroh_gossip/net/struct.Gossip.html @@ -1,7 +1,7 @@ Gossip in iroh_gossip::net - Rust

Struct iroh_gossip::net::Gossip

source ·
pub struct Gossip { /* private fields */ }
Expand description

Publish and subscribe on gossiping topics.

Each topic is a separate broadcast tree with separate memberships.

A topic has to be joined before you can publish or subscribe on the topic. -To join the swarm for a topic, you have to know the [PublicKey] of at least one peer that also joined the topic.

+To join the swarm for a topic, you have to know the PublicKey of at least one peer that also joined the topic.

Messages published on the swarm will be delivered to all peers that joined the swarm for that topic. You will also be relaying (gossiping) messages published by other peers.

With the default settings, the protocol will maintain up to 5 peer connections per topic.

@@ -13,15 +13,15 @@

Implementations§

source§

impl Gossip

source

pub fn from_endpoint( endpoint: Endpoint, config: Config, - my_addr: &AddrInfo + my_addr: &AddrInfo ) -> Self

Spawn a gossip actor and get a handle for it

source

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

source

pub async fn join( &self, topic: TopicId, - peers: Vec<PublicKey> + peers: Vec<PublicKey> ) -> Result<JoinTopicFut>

Join a topic and connect to peers.

-

This method only asks for [PublicKey]s. You must supply information on how to +

This method only asks for PublicKeys. You must supply information on how to connect to these peers manually before, by calling Endpoint::add_node_addr on the underlying Endpoint.

This method returns a future that completes once the request reached the local actor. diff --git a/pr/2583/docs/iroh_gossip/net/type.Command.html b/pr/2583/docs/iroh_gossip/net/type.Command.html index 032815b95d..bd9c43971c 100644 --- a/pr/2583/docs/iroh_gossip/net/type.Command.html +++ b/pr/2583/docs/iroh_gossip/net/type.Command.html @@ -1,9 +1,9 @@ -Command in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::Command

source ·
pub type Command = Command<PublicKey>;
Expand description

Commands for the gossip protocol

+Command in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::Command

source ·
pub type Command = Command<PublicKey>;
Expand description

Commands for the gossip protocol

Aliased Type§

enum Command {
-    Join(Vec<PublicKey>),
+    Join(Vec<PublicKey>),
     Broadcast(Bytes, Scope),
     Quit,
-}

Variants§

§

Join(Vec<PublicKey>)

Join this topic and connect to peers.

+}

Variants§

§

Join(Vec<PublicKey>)

Join this topic and connect to peers.

If the list of peers is empty, will prepare the state and accept incoming join requests, but only become operational after the first join request by another peer.

§

Broadcast(Bytes, Scope)

Broadcast a message for this topic.

diff --git a/pr/2583/docs/iroh_gossip/net/type.Event.html b/pr/2583/docs/iroh_gossip/net/type.Event.html index 3583896dda..de0132fadd 100644 --- a/pr/2583/docs/iroh_gossip/net/type.Event.html +++ b/pr/2583/docs/iroh_gossip/net/type.Event.html @@ -1,9 +1,9 @@ -Event in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::Event

source ·
pub type Event = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

+Event in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::Event

source ·
pub type Event = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

Aliased Type§

enum Event {
-    NeighborUp(PublicKey),
-    NeighborDown(PublicKey),
-    Received(GossipEvent<PublicKey>),
-}

Variants§

§

NeighborUp(PublicKey)

We have a new, direct neighbor in the swarm membership layer for this topic

-
§

NeighborDown(PublicKey)

We dropped direct neighbor in the swarm membership layer for this topic

-
§

Received(GossipEvent<PublicKey>)

A gossip message was received for this topic

+ NeighborUp(PublicKey), + NeighborDown(PublicKey), + Received(GossipEvent<PublicKey>), +}

Variants§

§

NeighborUp(PublicKey)

We have a new, direct neighbor in the swarm membership layer for this topic

+
§

NeighborDown(PublicKey)

We dropped direct neighbor in the swarm membership layer for this topic

+
§

Received(GossipEvent<PublicKey>)

A gossip message was received for this topic

\ No newline at end of file diff --git a/pr/2583/docs/iroh_gossip/net/util/fn.read_message.html b/pr/2583/docs/iroh_gossip/net/util/fn.read_message.html index 8d91262840..1c2a409a5d 100644 --- a/pr/2583/docs/iroh_gossip/net/util/fn.read_message.html +++ b/pr/2583/docs/iroh_gossip/net/util/fn.read_message.html @@ -2,5 +2,5 @@ reader: impl AsyncRead + Unpin, buffer: &mut BytesMut, max_message_size: usize -) -> Result<Option<Message<PublicKey>>>
Expand description

Read a length-prefixed message and decode as ProtoMessage;

+) -> Result<Option<Message<PublicKey>>>
Expand description

Read a length-prefixed message and decode as ProtoMessage;

\ No newline at end of file diff --git a/pr/2583/docs/iroh_gossip/net/util/fn.write_message.html b/pr/2583/docs/iroh_gossip/net/util/fn.write_message.html index 850419e0c0..949973b850 100644 --- a/pr/2583/docs/iroh_gossip/net/util/fn.write_message.html +++ b/pr/2583/docs/iroh_gossip/net/util/fn.write_message.html @@ -1,7 +1,7 @@ write_message in iroh_gossip::net::util - Rust

Function iroh_gossip::net::util::write_message

source ·
pub async fn write_message<W: AsyncWrite + Unpin>(
     writer: &mut W,
     buffer: &mut BytesMut,
-    frame: &Message<PublicKey>,
+    frame: &Message<PublicKey>,
     max_message_size: usize
 ) -> Result<()>
Expand description

Write a ProtoMessage as a length-prefixed, postcard-encoded message.

\ No newline at end of file diff --git a/pr/2583/docs/iroh_gossip/proto/topic/enum.Event.html b/pr/2583/docs/iroh_gossip/proto/topic/enum.Event.html index 442877097b..725eab41fb 100644 --- a/pr/2583/docs/iroh_gossip/proto/topic/enum.Event.html +++ b/pr/2583/docs/iroh_gossip/proto/topic/enum.Event.html @@ -8,7 +8,7 @@
§

Received(GossipEvent<PI>)

A gossip message was received for this topic

Trait Implementations§

source§

impl<PI: Clone> Clone for Event<PI>

source§

fn clone(&self) -> Event<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PI: Debug> Debug for Event<PI>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, PI> Deserialize<'de> for Event<PI>
where PI: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl<PI: Ord> Ord for Event<PI>

source§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl<PI: Ord> Ord for Event<PI>

source§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<PI: PartialEq> PartialEq for Event<PI>

source§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used diff --git a/pr/2583/docs/settings.html b/pr/2583/docs/settings.html index bf71602add..307c2f28a2 100644 --- a/pr/2583/docs/settings.html +++ b/pr/2583/docs/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/pr/2583/docs/trait.impl/core/convert/trait.From.js b/pr/2583/docs/trait.impl/core/convert/trait.From.js index 1a72418b61..fd13f7dab5 100644 --- a/pr/2583/docs/trait.impl/core/convert/trait.From.js +++ b/pr/2583/docs/trait.impl/core/convert/trait.From.js @@ -3,6 +3,6 @@ "iroh_base":[["impl From<&[u8; 32]> for Hash"],["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<FromHexError> for HexOrBase32ParseError"],["impl From<HexOrBase32ParseError> for KeyParsingError"],["impl From<BlobFormat> for u64"],["impl From<Error> for RpcError"],["impl From<Error> for RpcError"],["impl From<Url> for RelayUrl"],["impl From<DecodeError> for HexOrBase32ParseError"],["impl From<DecodeError> for Error"],["impl From<Hash> for Hash"],["impl From<Hash> for [u8; 32]"],["impl From<PublicKey> for NodeAddr"],["impl From<RelayUrl> for Url"],["impl From<Error> for KeyParsingError"],["impl From<Error> for Error"],["impl From<Hash> for Hash"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for Hash"],["impl From<[u8; 32]> for SecretKey"]], "iroh_blobs":[["impl From<&str> for Tag"],["impl From<(AtBlobContent, Result<BaoContentItem, DecodeError>)> for BlobContentNext"],["impl From<BlobId> for u64"],["impl From<GetResponseError> for Error"],["impl From<GetError> for FailureAction"],["impl From<AtBlobHeaderNextError> for GetError"],["impl From<AtBlobHeaderNextError> for DecodeError"],["impl From<AtBlobHeaderNextError> for Error"],["impl From<ConnectedNextError> for GetError"],["impl From<ConnectedNextError> for Error"],["impl From<DecodeError> for GetError"],["impl From<DecodeError> for Error"],["impl From<Closed> for VarInt"],["impl From<SpawnError> for Error"],["impl From<ProgressSendError> for GetError"],["impl From<ProgressSendError> for Error"],["impl From<String> for Tag"],["impl From<Vec<u8>> for SparseMemFile"],["impl From<Error> for GetError"],["impl From<Error> for DecodeError"],["impl From<Error> for GetResponseError"],["impl From<DownloadKind> for HashAndFormat"],["impl From<AtClosing> for ConnectedNext"],["impl From<AtClosing> for EndBlobNext"],["impl From<AtEndBlob> for BlobContentNext"],["impl From<AtStartChild> for ConnectedNext"],["impl From<AtStartChild> for EndBlobNext"],["impl From<AtStartRoot> for ConnectedNext"],["impl From<HashSeq> for Bytes"],["impl From<GetRequest> for Request"],["impl From<HashAndFormat> for DownloadKind"],["impl From<Tag> for Bytes"],["impl From<Bytes> for Tag"],["impl From<ConnectionError> for GetResponseError"],["impl From<ConnectionError> for GetError"],["impl From<DecodeError> for GetResponseError"],["impl From<DecodeError> for DecodeError"],["impl From<Error> for GetResponseError"],["impl From<ReadError> for GetResponseError"],["impl From<ReadError> for GetError"],["impl From<WriteError> for GetResponseError"],["impl From<WriteError> for GetError"],["impl From<WriteError> for ConnectedNextError"]], "iroh_docs":[["impl From<&Author> for AuthorPublicKey"],["impl From<&AuthorPublicKey> for AuthorId"],["impl From<&NamespacePublicKey> for NamespaceId"],["impl From<&NamespaceSecret> for NamespacePublicKey"],["impl From<&[u8; 32]> for AuthorId"],["impl From<&[u8; 32]> for NamespaceId"],["impl From<CapabilityKind> for u8"],["impl From<ValidationFailure> for InsertError"],["impl From<Error> for OpenError"],["impl From<QueryBuilder<FlatQuery>> for Query"],["impl From<QueryBuilder<SingleLatestPerKeyQuery>> for Query"],["impl From<Author> for AuthorId"],["impl From<Author> for AuthorPublicKey"],["impl From<AuthorId> for AuthorFilter"],["impl From<AuthorId> for [u8; 32]"],["impl From<AuthorPublicKey> for AuthorId"],["impl From<NamespaceId> for Capability"],["impl From<NamespaceId> for [u8; 32]"],["impl From<NamespacePublicKey> for NamespaceId"],["impl From<NamespaceSecret> for Capability"],["impl From<NamespaceSecret> for NamespaceId"],["impl From<NamespaceSecret> for NamespacePublicKey"],["impl From<ReadOnly> for InsertError"],["impl From<SignedEntry> for Entry"],["impl From<SigningKey> for Author"],["impl From<SigningKey> for NamespaceSecret"],["impl From<VerifyingKey> for AuthorPublicKey"],["impl From<VerifyingKey> for NamespacePublicKey"],["impl From<[u8; 32]> for AuthorId"],["impl From<[u8; 32]> for NamespaceId"],["impl<T: AsRef<[u8]>> From<T> for KeyFilter"]], -"iroh_gossip":[["impl From<Event<PublicKey>> for GossipEvent"],["impl<T: Into<[u8; 32]>> From<T> for TopicId"]], +"iroh_gossip":[["impl From<Event<PublicKey>> for GossipEvent"],["impl<T: Into<[u8; 32]>> From<T> for TopicId"]], "iroh_net":[["impl From<&NodeInfo> for TxtAttrs<IrohAttr>"],["impl From<&TxtAttrs<IrohAttr>> for NodeInfo"],["impl From<&Peer> for DiscoveryItem"],["impl From<IpAddr> for IpFamily"],["impl From<IpFamily> for Domain"],["impl From<Error> for ClientError"],["impl From<Error> for PingError"],["impl From<NodeInfo> for AddrInfo"],["impl From<NodeInfo> for NodeAddr"],["impl From<TxtAttrs<IrohAttr>> for NodeInfo"],["impl From<NodeInfo> for NodeAddr"],["impl From<ParseError> for Error"],["impl From<VerificationError> for Error"],["impl From<Error> for ClientError"],["impl From<Error> for ClientError"],["impl From<Error> for ClientError"],["impl From<Error> for GenError"],["impl From<Error> for ParseError"],["impl From<Error> for VerificationError"],["impl From<JoinError> for ClientError"],["impl From<SurgeError> for PingError"],["impl From<UdpSocket> for UdpSocket"],["impl<T> From<JoinHandle<T>> for AbortingJoinHandle<T>"],["impl<T> From<T> for ConcurrentDiscovery
where\n T: IntoIterator<Item = Box<dyn Discovery>>,
"],["impl<T: Clone + Send + 'static> From<JoinHandle<T>> for SharedAbortingJoinHandle<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/pr/2583/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2583/docs/trait.impl/iroh_metrics/core/trait.Metric.js index d96c0fcf7e..47b8fec7d8 100644 --- a/pr/2583/docs/trait.impl/iroh_metrics/core/trait.Metric.js +++ b/pr/2583/docs/trait.impl/iroh_metrics/core/trait.Metric.js @@ -1,9 +1,9 @@ (function() {var implementors = { -"iroh":[["impl Metric for Metrics"]], -"iroh_blobs":[["impl Metric for Metrics"]], +"iroh":[["impl Metric for Metrics"]], +"iroh_blobs":[["impl Metric for Metrics"]], "iroh_dns_server":[["impl Metric for Metrics"]], "iroh_docs":[["impl Metric for Metrics"]], -"iroh_gossip":[["impl Metric for Metrics"]], +"iroh_gossip":[["impl Metric for Metrics"]], "iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]], "iroh_relay":[["impl Metric for StunMetrics"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Command.js b/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Command.js index 10b9b76009..6df8c6e1b7 100644 --- a/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Command.js +++ b/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Command.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"iroh":[["
source§

impl<PI> Clone for Command<PI>
where\n PI: Clone,

source§

fn clone(&self) -> Command<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::Command"],["
source§

impl<PI> Debug for Command<PI>
where\n Vec<PI>: Debug,

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::Command"]] +"iroh":[["
§

impl<PI> Clone for Command<PI>
where\n PI: Clone,

§

fn clone(&self) -> Command<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::Command"],["
§

impl<PI> Debug for Command<PI>
where\n Vec<PI>: Debug,

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::Command"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Event.js b/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Event.js index f245da1c54..861b55c7fb 100644 --- a/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Event.js +++ b/pr/2583/docs/type.impl/iroh/gossip/proto/enum.Event.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"iroh":[["
source§

impl<PI> Clone for Event<PI>
where\n PI: Clone,

source§

fn clone(&self) -> Event<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::Event"],["
source§

impl<PI> Debug for Event<PI>
where\n PI: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::Event"],["
source§

impl<'de, PI> Deserialize<'de> for Event<PI>
where\n PI: Deserialize<'de>,

source§

fn deserialize<__D>(\n __deserializer: __D\n) -> Result<Event<PI>, <__D as Deserializer<'de>>::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::gossip::net::Event"],["
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::Event"],["
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::Event"],["
source§

impl<PI> Ord for Event<PI>
where\n PI: Ord,

source§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","iroh::gossip::net::Event"],["
source§

impl<PI> PartialEq for Event<PI>
where\n PI: PartialEq,

source§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","iroh::gossip::net::Event"],["
source§

impl<PI> PartialOrd for Event<PI>
where\n PI: PartialOrd,

source§

fn partial_cmp(&self, other: &Event<PI>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::gossip::net::Event"],["
source§

impl<PI> Serialize for Event<PI>
where\n PI: Serialize,

source§

fn serialize<__S>(\n &self,\n __serializer: __S\n) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","iroh::gossip::net::Event"],["
source§

impl<PI> Eq for Event<PI>
where\n PI: Eq,

","Eq","iroh::gossip::net::Event"],["
source§

impl<PI> StructuralPartialEq for Event<PI>

","StructuralPartialEq","iroh::gossip::net::Event"]] +"iroh":[["
§

impl<PI> Clone for Event<PI>
where\n PI: Clone,

§

fn clone(&self) -> Event<PI>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::Event"],["
§

impl<PI> Debug for Event<PI>
where\n PI: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::Event"],["
§

impl<'de, PI> Deserialize<'de> for Event<PI>
where\n PI: Deserialize<'de>,

§

fn deserialize<__D>(\n __deserializer: __D\n) -> Result<Event<PI>, <__D as Deserializer<'de>>::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::gossip::net::Event"],["
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::Event"],["
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::Event"],["
§

impl<PI> Ord for Event<PI>
where\n PI: Ord,

§

fn cmp(&self, other: &Event<PI>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","iroh::gossip::net::Event"],["
§

impl<PI> PartialEq for Event<PI>
where\n PI: PartialEq,

§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","iroh::gossip::net::Event"],["
§

impl<PI> PartialOrd for Event<PI>
where\n PI: PartialOrd,

§

fn partial_cmp(&self, other: &Event<PI>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::gossip::net::Event"],["
§

impl<PI> Serialize for Event<PI>
where\n PI: Serialize,

§

fn serialize<__S>(\n &self,\n __serializer: __S\n) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","iroh::gossip::net::Event"],["
§

impl<PI> Eq for Event<PI>
where\n PI: Eq,

","Eq","iroh::gossip::net::Event"],["
§

impl<PI> StructuralPartialEq for Event<PI>

","StructuralPartialEq","iroh::gossip::net::Event"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/pr/2583/docs/type.impl/iroh/net/key/struct.PublicKey.js b/pr/2583/docs/type.impl/iroh/net/key/struct.PublicKey.js index 1622cafb77..4cb64d296d 100644 --- a/pr/2583/docs/type.impl/iroh/net/key/struct.PublicKey.js +++ b/pr/2583/docs/type.impl/iroh/net/key/struct.PublicKey.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"iroh":[["
source§

impl AsRef<[u8]> for PublicKey

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[u8]>","iroh::net::NodeId"],["
source§

impl Clone for PublicKey

source§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","iroh::net::NodeId"],["
source§

impl Debug for PublicKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::net::NodeId"],["
source§

impl<'de> Deserialize<'de> for PublicKey

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::net::NodeId"],["
source§

impl Display for PublicKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Display","iroh::net::NodeId"],["
source§

impl From<VerifyingKey> for PublicKey

source§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
","From","iroh::net::NodeId"],["
source§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

\n

Display is capable of serialising this format.

\n
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
","FromStr","iroh::net::NodeId"],["
source§

impl Hash for PublicKey

source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","iroh::net::NodeId"],["
source§

impl Ord for PublicKey

source§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","iroh::net::NodeId"],["
source§

impl PartialEq for PublicKey

source§

fn eq(&self, other: &PublicKey) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","iroh::net::NodeId"],["
source§

impl PartialOrd for PublicKey

source§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::net::NodeId"],["
source§

impl PublicKey

source

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

\n
source

pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

Construct a PublicKey from a slice of bytes.

\n
§Warning
\n

This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

\n
source

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this secret key’s public key.

\n
§Return
\n

Returns Ok(()) if the signature is valid, and Err otherwise.

\n
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string\nrepresentation of the key.

\n
",0,"iroh::net::NodeId"],["
source§

impl Serialize for PublicKey

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","iroh::net::NodeId"],["
source§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(\n bytes: &[u8]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
","TryFrom<&[u8]>","iroh::net::NodeId"],["
source§

impl TryFrom<&[u8; 32]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(\n bytes: &[u8; 32]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
","TryFrom<&[u8; 32]>","iroh::net::NodeId"],["
source§

impl Copy for PublicKey

","Copy","iroh::net::NodeId"],["
source§

impl Eq for PublicKey

","Eq","iroh::net::NodeId"],["
source§

impl StructuralPartialEq for PublicKey

","StructuralPartialEq","iroh::net::NodeId"]] +"iroh":[["
§

impl AsRef<[u8]> for PublicKey

§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[u8]>","iroh::net::NodeId"],["
§

impl Clone for PublicKey

§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","iroh::net::NodeId"],["
§

impl Debug for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::net::NodeId"],["
§

impl<'de> Deserialize<'de> for PublicKey

§

fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::net::NodeId"],["
§

impl Display for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Display","iroh::net::NodeId"],["
§

impl From<VerifyingKey> for PublicKey

§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
","From","iroh::net::NodeId"],["
§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

\n

Display is capable of serialising this format.

\n
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
","FromStr","iroh::net::NodeId"],["
§

impl Hash for PublicKey

§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","iroh::net::NodeId"],["
§

impl Ord for PublicKey

§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","iroh::net::NodeId"],["
§

impl PartialEq for PublicKey

§

fn eq(&self, other: &PublicKey) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","iroh::net::NodeId"],["
§

impl PartialOrd for PublicKey

§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::net::NodeId"],["
§

impl PublicKey

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

\n

pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

Construct a PublicKey from a slice of bytes.

\n
§Warning
\n

This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

\n

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this secret key’s public key.

\n
§Return
\n

Returns Ok(()) if the signature is valid, and Err otherwise.

\n

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string\nrepresentation of the key.

\n
",0,"iroh::net::NodeId"],["
§

impl Serialize for PublicKey

§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","iroh::net::NodeId"],["
§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(\n bytes: &[u8]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
","TryFrom<&[u8]>","iroh::net::NodeId"],["
§

impl TryFrom<&[u8; 32]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(\n bytes: &[u8; 32]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
","TryFrom<&[u8; 32]>","iroh::net::NodeId"],["
§

impl Copy for PublicKey

","Copy","iroh::net::NodeId"],["
§

impl Eq for PublicKey

","Eq","iroh::net::NodeId"],["
§

impl StructuralPartialEq for PublicKey

","StructuralPartialEq","iroh::net::NodeId"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/pr/2583/docs/type.impl/std/primitive.array.js b/pr/2583/docs/type.impl/std/primitive.array.js index 3f9a615647..20af29001d 100644 --- a/pr/2583/docs/type.impl/std/primitive.array.js +++ b/pr/2583/docs/type.impl/std/primitive.array.js @@ -1,4 +1,4 @@ (function() {var type_impls = { -"iroh":[["
source§

impl<T, const N: usize> [T; N]

1.55.0 · source

pub fn map<F, U>(self, f: F) -> [U; N]
where\n F: FnMut(T) -> U,

Returns an array of the same size as self, with function f applied to each element\nin order.

\n

If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

\n
§Note on performance and stack usage
\n

Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

\n

Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

\n

In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

\n
§Examples
\n
let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
\n
source

pub fn try_map<F, R>(\n self,\n f: F\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
where\n F: FnMut(T) -> R,\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

🔬This is a nightly-only experimental API. (array_try_map)

A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

\n

The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

\n
§Examples
\n
#![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
\n
1.57.0 (const: 1.57.0) · source

pub const fn as_slice(&self) -> &[T]

Returns a slice containing the entire array. Equivalent to &s[..].

\n
1.57.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

\n
1.77.0 · source

pub fn each_ref(&self) -> [&T; N]

Borrows each element and returns an array of references with the same\nsize as self.

\n
§Example
\n
let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
\n

This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

\n\n
let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
\n
1.77.0 · source

pub fn each_mut(&mut self) -> [&mut T; N]

Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

\n
§Example
\n
\nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
\n
source

pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
\n
source

pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
source

pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
\n
source

pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
",0,"iroh::docs::PeerIdBytes"],["
source§

impl<const N: usize> [u8; N]

source

pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

\n
§Examples
\n
#![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
\n
source

pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

\n
§Safety
\n

Every byte in the array must be in 0..=127, or else this is UB.

\n
",0,"iroh::docs::PeerIdBytes"],["
§

impl<T> Array for [T; 32]
where\n T: Default,

§

type Item = T

The type of the items in the thing.
§

const CAPACITY: usize = 32usize

The number of slots in the thing.
§

fn as_slice(&self) -> &[T]

Gives a shared slice over the whole thing. Read more
§

fn as_slice_mut(&mut self) -> &mut [T]

Gives a unique slice over the whole thing. Read more
§

fn default() -> [T; 32]

Create a default-initialized instance of ourself, similar to the\nDefault trait, but implemented for the same range of sizes as\n[Array].
","Array","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> Array for [T; N]

§

type Item = T

The type of the array’s elements.
§

fn size() -> usize

Returns the number of items the array can hold.
","Array","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> AsBytes for [T; N]
where\n T: AsBytes,

§

fn as_bytes(&self) -> &[u8]

Gets the bytes of this value. Read more
§

fn write_to(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to bytes. Read more
§

fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the prefix of bytes. Read more
§

fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the suffix of bytes. Read more
","AsBytes","iroh::docs::PeerIdBytes"],["
§

impl AsBytes for [u8; 32]

§

fn as_bytes(&self) -> &[u8]

Casts the input type to a byte slice
","AsBytes","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsMut<[T]> for [T; N]

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsRef<[T]> for [T; N]

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> BitView for [T; N]
where\n T: BitStore,

Note that overly-large arrays may cause the conversions to fail.

\n
§

type Store = T

The underlying element type.
§

fn view_bits<O>(&self) -> &BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as an immutable bit-slice.
§

fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as an immutable bit-slice. Read more
§

fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as a mutable bit-slice.
§

fn try_view_bits_mut<O>(\n &mut self\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as a mutable bit-slice. Read more
","BitView","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> BitViewSized for [T; N]
where\n T: BitStore,

§

const ZERO: [T; N] = _

The zero constant.
§

fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

Views the type as a slice of its elements.
§

fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

Views the type as a mutable slice of its elements.
§

fn into_bitarray<O>(self) -> BitArray<Self, O>
where\n O: BitOrder,

Wraps self in a BitArray.
","BitViewSized","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> Borrow<[T]> for [T; N]

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> BorrowMut<[T]> for [T; N]

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","iroh::docs::PeerIdBytes"],["
§

impl<S, const N: usize> Chain for [S; N]
where\n S: Stream,

§

type Item = <S as Stream>::Item

What’s the return type of our stream?
§

type Stream = Chain<S, N>

What stream do we return?
§

fn chain(self) -> <[S; N] as Chain>::Stream

Combine multiple streams into a single stream.
","Chain","iroh::docs::PeerIdBytes"],["
1.58.0 · source§

impl<T, const N: usize> Clone for [T; N]
where\n T: Clone,

source§

fn clone(&self) -> [T; N]

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &[T; N])

Performs copy-assignment from source. Read more
","Clone","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Debug for [T; N]
where\n T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> Decode for [u8; N]

Decodes a byte array from byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

type Error = Error

Type returned in the event of a decoding error.
§

fn decode(reader: &mut impl Reader) -> Result<[u8; N], Error>

Attempt to decode a value of this type using the provided [Reader].
","Decode","iroh::docs::PeerIdBytes"],["
§

impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
where\n T: Decode<'a>,

§

fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
where\n R: Reader<'a>,

Attempt to decode this message using the provided [Reader].
","DecodeValue<'a>","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 32]
where\n T: Default,

source§

fn default() -> [T; 32]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 31]
where\n T: Default,

source§

fn default() -> [T; 31]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 30]
where\n T: Default,

source§

fn default() -> [T; 30]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 29]
where\n T: Default,

source§

fn default() -> [T; 29]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 28]
where\n T: Default,

source§

fn default() -> [T; 28]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 27]
where\n T: Default,

source§

fn default() -> [T; 27]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 26]
where\n T: Default,

source§

fn default() -> [T; 26]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 25]
where\n T: Default,

source§

fn default() -> [T; 25]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 24]
where\n T: Default,

source§

fn default() -> [T; 24]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 23]
where\n T: Default,

source§

fn default() -> [T; 23]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 22]
where\n T: Default,

source§

fn default() -> [T; 22]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 21]
where\n T: Default,

source§

fn default() -> [T; 21]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 20]
where\n T: Default,

source§

fn default() -> [T; 20]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 19]
where\n T: Default,

source§

fn default() -> [T; 19]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 18]
where\n T: Default,

source§

fn default() -> [T; 18]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 17]
where\n T: Default,

source§

fn default() -> [T; 17]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 16]
where\n T: Default,

source§

fn default() -> [T; 16]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 15]
where\n T: Default,

source§

fn default() -> [T; 15]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 14]
where\n T: Default,

source§

fn default() -> [T; 14]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 13]
where\n T: Default,

source§

fn default() -> [T; 13]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 12]
where\n T: Default,

source§

fn default() -> [T; 12]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 11]
where\n T: Default,

source§

fn default() -> [T; 11]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 10]
where\n T: Default,

source§

fn default() -> [T; 10]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 9]
where\n T: Default,

source§

fn default() -> [T; 9]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 8]
where\n T: Default,

source§

fn default() -> [T; 8]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 7]
where\n T: Default,

source§

fn default() -> [T; 7]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 6]
where\n T: Default,

source§

fn default() -> [T; 6]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 5]
where\n T: Default,

source§

fn default() -> [T; 5]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 4]
where\n T: Default,

source§

fn default() -> [T; 4]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 3]
where\n T: Default,

source§

fn default() -> [T; 3]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 2]
where\n T: Default,

source§

fn default() -> [T; 2]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 1]
where\n T: Default,

source§

fn default() -> [T; 1]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 0]

source§

fn default() -> [T; 0]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
source§

impl<'de, T> Deserialize<'de> for [T; 32]
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
source§

impl<'de, const N: usize> Deserialize<'de> for [u8; N]

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> Encode for [u8; N]

Encodes [u8; N] into byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

fn encoded_len(&self) -> Result<usize, Error>

Get the length of this type encoded in bytes, prior to Base64 encoding.
§

fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value using the provided [Writer].
§

fn encoded_len_prefixed(&self) -> Result<usize, Error>

Return the length of this type after encoding when prepended with a\nuint32 length prefix.
§

fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value, first prepending a uint32 length prefix\nset to [Encode::encoded_len].
","Encode","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeLabelSet for [T; N]
where\n T: EncodeLabel,

§

fn encode(&self, encoder: LabelSetEncoder<'_>) -> Result<(), Error>

Encode oneself into the given encoder.
","EncodeLabelSet","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeValue for [T; N]
where\n T: Encode,

§

fn value_len(&self) -> Result<Length, Error>

Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
§

fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
§

fn header(&self) -> Result<Header, Error>
where\n Self: Tagged,

Get the [Header] used to encode this value.
","EncodeValue","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 32]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 31]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 30]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 29]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 28]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 27]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 26]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 25]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 24]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 23]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 22]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 21]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 20]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 19]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 18]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 17]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 16]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 15]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 14]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 13]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 12]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 11]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 10]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 9]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 8]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 7]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 6]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 5]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 4]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 3]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 0]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2048]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1024]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 512]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 256]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 128]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 64]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
§

impl<'a> FindToken<&'a u8> for [u8; 32]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","iroh::docs::PeerIdBytes"],["
§

impl FindToken<u8> for [u8; 32]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> FixedTag for [T; N]

§

const TAG: Tag = Tag::Sequence

ASN.1 tag
","FixedTag","iroh::docs::PeerIdBytes"],["
§

impl From<&Signature> for [u8; 64]

§

fn from(sig: &Signature) -> [u8; 64]

Converts to this type from the input type.
","From<&Signature>","iroh::docs::PeerIdBytes"],["
source§

impl From<AuthorId> for [u8; 32]

source§

fn from(value: AuthorId) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>\n) -> [T; 32]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>>>","iroh::docs::PeerIdBytes"],["
source§

impl From<Hash> for [u8; 32]

source§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl From<Hash> for [u8; 32]

§

fn from(hash: Hash) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, const UPPERCASE: bool> From<HexOrBin<N, UPPERCASE>> for [u8; N]

§

fn from(hex_or_bin: HexOrBin<N, UPPERCASE>) -> [u8; N]

Converts to this type from the input type.
","From>","iroh::docs::PeerIdBytes"],["
§

impl From<MacAddr> for [u8; 6]

§

fn from(addr: MacAddr) -> [u8; 6]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
source§

impl From<NamespaceId> for [u8; 32]

source§

fn from(value: NamespaceId) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl From<Signature> for [u8; 64]

§

fn from(sig: Signature) -> [u8; 64]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
source§

impl<T, const N: usize> From<Simd<T, N>> for [T; N]

source§

fn from(vector: Simd<T, N>) -> [T; N]

Converts to this type from the input type.
","From>","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> FromBytes for [T; N]
where\n T: FromBytes,

§

fn ref_from(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the given bytes as a &Self without copying. Read more
§

fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &Self without copying. Read more
§

fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &Self without copying. Read more
§

fn slice_from(bytes: &[u8]) -> Option<&[Self]>
where\n Self: Sized,

Interprets the given bytes as a &[Self] without copying. Read more
§

fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn read_from(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from bytes. Read more
§

fn read_from_prefix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the prefix of bytes. Read more
§

fn read_from_suffix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the suffix of bytes. Read more
","FromBytes","iroh::docs::PeerIdBytes"],["
source§

impl FromHex for [u8; 32]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> FromZeroes for [T; N]
where\n T: FromZeroes,

§

fn zero(&mut self)

Overwrites self with zeroes. Read more
§

fn new_zeroed() -> Self
where\n Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
","FromZeroes","iroh::docs::PeerIdBytes"],["
§

impl<T> Hash for [T; 32]
where\n T: Hash,

§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher.
§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher.
","Hash","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Hash for [T; N]
where\n T: Hash,

The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","iroh::docs::PeerIdBytes"],["
1.50.0 · source§

impl<T, I, const N: usize> Index<I> for [T; N]
where\n [T]: Index<I>,

§

type Output = <[T] as Index<I>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","iroh::docs::PeerIdBytes"],["
1.50.0 · source§

impl<T, I, const N: usize> IndexMut<I> for [T; N]
where\n [T]: IndexMut<I>,

source§

fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","iroh::docs::PeerIdBytes"],["
§

impl InputLength for [u8; 32]

§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","InputLength","iroh::docs::PeerIdBytes"],["
1.53.0 · source§

impl<T, const N: usize> IntoIterator for [T; N]

source§

fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

\n

Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, N>

Which kind of iterator are we turning this into?
","IntoIterator","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> IntoResponse for [u8; N]

§

fn into_response(self) -> Response<Body>

Create a response.
","IntoResponse","iroh::docs::PeerIdBytes"],["
§

impl<Fut, const N: usize> Join for [Fut; N]
where\n Fut: IntoFuture,

§

type Output = [<Fut as IntoFuture>::Output; N]

The resulting output type.
§

type Future = Join<<Fut as IntoFuture>::IntoFuture, N>

The Future implementation returned by this method.
§

fn join(self) -> <[Fut; N] as Join>::Future

Waits for multiple futures to complete. Read more
","Join","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> Key for [T; N]
where\n T: Key,

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
","Key","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> MaxSize for [T; N]
where\n T: MaxSize,

§

const POSTCARD_MAX_SIZE: usize = _

The maximum possible size that the serialization of this\ntype can have, in bytes.
","MaxSize","iroh::docs::PeerIdBytes"],["
§

impl<S, const N: usize> Merge for [S; N]
where\n S: IntoStream,

§

type Item = <Merge<<S as IntoStream>::IntoStream, N> as Stream>::Item

The resulting output type.
§

type Stream = Merge<<S as IntoStream>::IntoStream, N>

The stream type.
§

fn merge(self) -> <[S; N] as Merge>::Stream

Combine multiple streams into a single stream.
","Merge","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Ord for [T; N]
where\n T: Ord,

Implements comparison of arrays lexicographically.

\n
source§

fn cmp(&self, other: &[T; N]) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","iroh::docs::PeerIdBytes"],["
§

impl PartialEq<Cookie> for [u8; 4]

§

fn eq(&self, other: &Cookie) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","iroh::docs::PeerIdBytes"],["
§

impl<A, B, const N: usize, const M: usize> PartialEq<Vec<A, N>> for [B; M]
where\n A: PartialEq<B>,

§

fn eq(&self, other: &Vec<A, N>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> PartialOrd for [T; N]
where\n T: PartialOrd,

Implements comparison of arrays lexicographically.

\n
source§

fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &[T; N]) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &[T; N]) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
source§

fn ge(&self, other: &[T; N]) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
source§

fn gt(&self, other: &[T; N]) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
","PartialOrd","iroh::docs::PeerIdBytes"],["
§

impl<Fut, const N: usize> Race for [Fut; N]
where\n Fut: IntoFuture,

§

type Output = <Fut as IntoFuture>::Output

The resulting output type.
§

type Future = Race<<Fut as IntoFuture>::IntoFuture, N>

Which kind of future are we turning this into?
§

fn race(self) -> <[Fut; N] as Race>::Future

Wait for the first future to complete. Read more
","Race","iroh::docs::PeerIdBytes"],["
§

impl<Fut, T, E, const N: usize> RaceOk for [Fut; N]
where\n Fut: IntoFuture<Output = Result<T, E>>,

§

type Output = T

The resulting output type.
§

type Error = AggregateError<E, N>

The resulting error type.
§

type Future = RaceOk<<Fut as IntoFuture>::IntoFuture, T, E, N>

Which kind of future are we turning this into?
§

fn race_ok(self) -> <[Fut; N] as RaceOk>::Future

Waits for the first successful future to complete.
","RaceOk","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> Schema for [T; N]
where\n T: Schema,

§

const SCHEMA: &'static NamedType = _

A recursive data structure that describes the schema of the given\ntype.
","Schema","iroh::docs::PeerIdBytes"],["
source§

impl<T> Serialize for [T; 32]
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","iroh::docs::PeerIdBytes"],["
source§

impl<const N: usize> Serialize for [u8; N]

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

","Serialize","iroh::docs::PeerIdBytes"],["
1.51.0 · source§

impl<T, const N: usize> SlicePattern for [T; N]

§

type Item = T

🔬This is a nightly-only experimental API. (slice_pattern)
The element type of the slice being matched on.
source§

fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

🔬This is a nightly-only experimental API. (slice_pattern)
Currently, the consumers of SlicePattern need a slice.
","SlicePattern","iroh::docs::PeerIdBytes"],["
1.34.0 · source§

impl<T, const N: usize> TryFrom<&[T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

\n\n
let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&[T]>","iroh::docs::PeerIdBytes"],["
1.59.0 · source§

impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

\n\n
let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&mut [T]>","iroh::docs::PeerIdBytes"],["
§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","iroh::docs::PeerIdBytes"],["
1.48.0 · source§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

source§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","iroh::docs::PeerIdBytes"],["
§

impl<Fut, T, E, const N: usize> TryJoin for [Fut; N]
where\n Fut: IntoFuture<Output = Result<T, E>>,

§

type Output = [T; N]

The resulting output type.
§

type Error = E

The resulting error type.
§

type Future = TryJoin<<Fut as IntoFuture>::IntoFuture, T, E, N>

Which kind of future are we turning this into?
§

fn try_join(self) -> <[Fut; N] as TryJoin>::Future

Waits for multiple futures to complete, either returning when all\nfutures complete successfully, or return early when any future completes\nwith an error.
","TryJoin","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> Value for [T; N]
where\n T: Value,

§

type SelfType<'a> = [<T as Value>::SelfType<'a>; N]\nwhere\n [T; N]: 'a

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Vec<u8>\nwhere\n [T; N]: 'a

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> [<T as Value>::SelfType<'a>; N]
where\n [T; N]: 'a,

Deserializes data\nImplementations may return a view over data, or an owned type
§

fn as_bytes<'a, 'b>(value: &'a <[T; N] as Value>::SelfType<'b>) -> Vec<u8>
where\n 'b: 'a,\n [T; N]: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
","Value","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> ValueOrd for [T; N]
where\n T: DerOrd,

§

fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
","ValueOrd","iroh::docs::PeerIdBytes"],["
§

impl<Z, const N: usize> Zeroize for [Z; N]
where\n Z: Zeroize,

Impl [Zeroize] on arrays of types that impl [Zeroize].

\n
§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
","Zeroize","iroh::docs::PeerIdBytes"],["
§

impl<S, const N: usize> Zip for [S; N]
where\n S: IntoStream,

§

type Item = <Zip<<S as IntoStream>::IntoStream, N> as Stream>::Item

What’s the return type of our stream?
§

type Stream = Zip<<S as IntoStream>::IntoStream, N>

What stream do we return?
§

fn zip(self) -> <[S; N] as Zip>::Stream

Combine multiple streams into a single stream.
","Zip","iroh::docs::PeerIdBytes"],["
source§

impl<T, const N: usize> ConstParamTy for [T; N]
where\n T: ConstParamTy,

","ConstParamTy","iroh::docs::PeerIdBytes"],["
1.58.0 · source§

impl<T, const N: usize> Copy for [T; N]
where\n T: Copy,

","Copy","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Eq for [T; N]
where\n T: Eq,

","Eq","iroh::docs::PeerIdBytes"],["
source§

impl<T, const N: usize> StructuralPartialEq for [T; N]

","StructuralPartialEq","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> Unaligned for [T; N]
where\n T: Unaligned,

","Unaligned","iroh::docs::PeerIdBytes"],["
§

impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
where\n Z: ZeroizeOnDrop,

Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

\n
","ZeroizeOnDrop","iroh::docs::PeerIdBytes"]], +"iroh":[["
source§

impl<T, const N: usize> [T; N]

1.55.0 · source

pub fn map<F, U>(self, f: F) -> [U; N]
where\n F: FnMut(T) -> U,

Returns an array of the same size as self, with function f applied to each element\nin order.

\n

If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

\n
§Note on performance and stack usage
\n

Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

\n

Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

\n

In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

\n
§Examples
\n
let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
\n
source

pub fn try_map<F, R>(\n self,\n f: F\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
where\n F: FnMut(T) -> R,\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

🔬This is a nightly-only experimental API. (array_try_map)

A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

\n

The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

\n
§Examples
\n
#![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
\n
1.57.0 (const: 1.57.0) · source

pub const fn as_slice(&self) -> &[T]

Returns a slice containing the entire array. Equivalent to &s[..].

\n
1.57.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

\n
1.77.0 · source

pub fn each_ref(&self) -> [&T; N]

Borrows each element and returns an array of references with the same\nsize as self.

\n
§Example
\n
let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
\n

This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

\n\n
let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
\n
1.77.0 · source

pub fn each_mut(&mut self) -> [&mut T; N]

Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

\n
§Example
\n
\nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
\n
source

pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
\n
source

pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
source

pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
\n
source

pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
",0,"iroh::docs::PeerIdBytes"],["
source§

impl<const N: usize> [u8; N]

source

pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

\n
§Examples
\n
#![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
\n
source

pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

\n
§Safety
\n

Every byte in the array must be in 0..=127, or else this is UB.

\n
",0,"iroh::docs::PeerIdBytes"],["
§

impl<T> Array for [T; 32]
where\n T: Default,

§

type Item = T

The type of the items in the thing.
§

const CAPACITY: usize = 32usize

The number of slots in the thing.
§

fn as_slice(&self) -> &[T]

Gives a shared slice over the whole thing. Read more
§

fn as_slice_mut(&mut self) -> &mut [T]

Gives a unique slice over the whole thing. Read more
§

fn default() -> [T; 32]

Create a default-initialized instance of ourself, similar to the\nDefault trait, but implemented for the same range of sizes as\n[Array].
","Array","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> Array for [T; N]

§

type Item = T

The type of the array’s elements.
§

fn size() -> usize

Returns the number of items the array can hold.
","Array","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> AsBytes for [T; N]
where\n T: AsBytes,

§

fn as_bytes(&self) -> &[u8]

Gets the bytes of this value. Read more
§

fn write_to(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to bytes. Read more
§

fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the prefix of bytes. Read more
§

fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the suffix of bytes. Read more
","AsBytes","iroh::docs::PeerIdBytes"],["
§

impl AsBytes for [u8; 32]

§

fn as_bytes(&self) -> &[u8]

Casts the input type to a byte slice
","AsBytes","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsMut<[T]> for [T; N]

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsRef<[T]> for [T; N]

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> BitView for [T; N]
where\n T: BitStore,

Note that overly-large arrays may cause the conversions to fail.

\n
§

type Store = T

The underlying element type.
§

fn view_bits<O>(&self) -> &BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as an immutable bit-slice.
§

fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as an immutable bit-slice. Read more
§

fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as a mutable bit-slice.
§

fn try_view_bits_mut<O>(\n &mut self\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as a mutable bit-slice. Read more
","BitView","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> BitViewSized for [T; N]
where\n T: BitStore,

§

const ZERO: [T; N] = _

The zero constant.
§

fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

Views the type as a slice of its elements.
§

fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

Views the type as a mutable slice of its elements.
§

fn into_bitarray<O>(self) -> BitArray<Self, O>
where\n O: BitOrder,

Wraps self in a BitArray.
","BitViewSized","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> Borrow<[T]> for [T; N]

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> BorrowMut<[T]> for [T; N]

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","iroh::docs::PeerIdBytes"],["
§

impl<S, const N: usize> Chain for [S; N]
where\n S: Stream,

§

type Item = <S as Stream>::Item

What’s the return type of our stream?
§

type Stream = Chain<S, N>

What stream do we return?
§

fn chain(self) -> <[S; N] as Chain>::Stream

Combine multiple streams into a single stream.
","Chain","iroh::docs::PeerIdBytes"],["
1.58.0 · source§

impl<T, const N: usize> Clone for [T; N]
where\n T: Clone,

source§

fn clone(&self) -> [T; N]

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &[T; N])

Performs copy-assignment from source. Read more
","Clone","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Debug for [T; N]
where\n T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> Decode for [u8; N]

Decodes a byte array from byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

type Error = Error

Type returned in the event of a decoding error.
§

fn decode(reader: &mut impl Reader) -> Result<[u8; N], Error>

Attempt to decode a value of this type using the provided [Reader].
","Decode","iroh::docs::PeerIdBytes"],["
§

impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
where\n T: Decode<'a>,

§

fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
where\n R: Reader<'a>,

Attempt to decode this message using the provided [Reader].
","DecodeValue<'a>","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 32]
where\n T: Default,

source§

fn default() -> [T; 32]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 31]
where\n T: Default,

source§

fn default() -> [T; 31]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 30]
where\n T: Default,

source§

fn default() -> [T; 30]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 29]
where\n T: Default,

source§

fn default() -> [T; 29]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 28]
where\n T: Default,

source§

fn default() -> [T; 28]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 27]
where\n T: Default,

source§

fn default() -> [T; 27]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 26]
where\n T: Default,

source§

fn default() -> [T; 26]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 25]
where\n T: Default,

source§

fn default() -> [T; 25]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 24]
where\n T: Default,

source§

fn default() -> [T; 24]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 23]
where\n T: Default,

source§

fn default() -> [T; 23]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 22]
where\n T: Default,

source§

fn default() -> [T; 22]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 21]
where\n T: Default,

source§

fn default() -> [T; 21]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 20]
where\n T: Default,

source§

fn default() -> [T; 20]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 19]
where\n T: Default,

source§

fn default() -> [T; 19]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 18]
where\n T: Default,

source§

fn default() -> [T; 18]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 17]
where\n T: Default,

source§

fn default() -> [T; 17]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 16]
where\n T: Default,

source§

fn default() -> [T; 16]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 15]
where\n T: Default,

source§

fn default() -> [T; 15]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 14]
where\n T: Default,

source§

fn default() -> [T; 14]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 13]
where\n T: Default,

source§

fn default() -> [T; 13]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 12]
where\n T: Default,

source§

fn default() -> [T; 12]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 11]
where\n T: Default,

source§

fn default() -> [T; 11]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 10]
where\n T: Default,

source§

fn default() -> [T; 10]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 9]
where\n T: Default,

source§

fn default() -> [T; 9]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 8]
where\n T: Default,

source§

fn default() -> [T; 8]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 7]
where\n T: Default,

source§

fn default() -> [T; 7]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 6]
where\n T: Default,

source§

fn default() -> [T; 6]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 5]
where\n T: Default,

source§

fn default() -> [T; 5]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 4]
where\n T: Default,

source§

fn default() -> [T; 4]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 3]
where\n T: Default,

source§

fn default() -> [T; 3]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 2]
where\n T: Default,

source§

fn default() -> [T; 2]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 1]
where\n T: Default,

source§

fn default() -> [T; 1]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 0]

source§

fn default() -> [T; 0]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
source§

impl<'de, T> Deserialize<'de> for [T; 32]
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
source§

impl<'de, const N: usize> Deserialize<'de> for [u8; N]

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> Encode for [u8; N]

Encodes [u8; N] into byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

fn encoded_len(&self) -> Result<usize, Error>

Get the length of this type encoded in bytes, prior to Base64 encoding.
§

fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value using the provided [Writer].
§

fn encoded_len_prefixed(&self) -> Result<usize, Error>

Return the length of this type after encoding when prepended with a\nuint32 length prefix.
§

fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value, first prepending a uint32 length prefix\nset to [Encode::encoded_len].
","Encode","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeLabelSet for [T; N]
where\n T: EncodeLabel,

§

fn encode(&self, encoder: LabelSetEncoder<'_>) -> Result<(), Error>

Encode oneself into the given encoder.
","EncodeLabelSet","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeValue for [T; N]
where\n T: Encode,

§

fn value_len(&self) -> Result<Length, Error>

Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
§

fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
§

fn header(&self) -> Result<Header, Error>
where\n Self: Tagged,

Get the [Header] used to encode this value.
","EncodeValue","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 32]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 31]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 30]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 29]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 28]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 27]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 26]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 25]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 24]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 23]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 22]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 21]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 20]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 19]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 18]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 17]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 16]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 15]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 14]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 13]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 12]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 11]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 10]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 9]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 8]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 7]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 6]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 5]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 4]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 3]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 0]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2048]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1024]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 512]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 256]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 128]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 64]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
§

impl<'a> FindToken<&'a u8> for [u8; 32]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","iroh::docs::PeerIdBytes"],["
§

impl FindToken<u8> for [u8; 32]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> FixedTag for [T; N]

§

const TAG: Tag = Tag::Sequence

ASN.1 tag
","FixedTag","iroh::docs::PeerIdBytes"],["
§

impl From<&Signature> for [u8; 64]

§

fn from(sig: &Signature) -> [u8; 64]

Converts to this type from the input type.
","From<&Signature>","iroh::docs::PeerIdBytes"],["
source§

impl From<AuthorId> for [u8; 32]

source§

fn from(value: AuthorId) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>\n) -> [T; 32]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>>>","iroh::docs::PeerIdBytes"],["
§

impl From<Hash> for [u8; 32]

§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl From<Hash> for [u8; 32]

§

fn from(hash: Hash) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, const UPPERCASE: bool> From<HexOrBin<N, UPPERCASE>> for [u8; N]

§

fn from(hex_or_bin: HexOrBin<N, UPPERCASE>) -> [u8; N]

Converts to this type from the input type.
","From>","iroh::docs::PeerIdBytes"],["
§

impl From<MacAddr> for [u8; 6]

§

fn from(addr: MacAddr) -> [u8; 6]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
source§

impl From<NamespaceId> for [u8; 32]

source§

fn from(value: NamespaceId) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl From<Signature> for [u8; 64]

§

fn from(sig: Signature) -> [u8; 64]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
source§

impl<T, const N: usize> From<Simd<T, N>> for [T; N]

source§

fn from(vector: Simd<T, N>) -> [T; N]

Converts to this type from the input type.
","From>","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> FromBytes for [T; N]
where\n T: FromBytes,

§

fn ref_from(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the given bytes as a &Self without copying. Read more
§

fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &Self without copying. Read more
§

fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &Self without copying. Read more
§

fn slice_from(bytes: &[u8]) -> Option<&[Self]>
where\n Self: Sized,

Interprets the given bytes as a &[Self] without copying. Read more
§

fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn read_from(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from bytes. Read more
§

fn read_from_prefix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the prefix of bytes. Read more
§

fn read_from_suffix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the suffix of bytes. Read more
","FromBytes","iroh::docs::PeerIdBytes"],["
source§

impl FromHex for [u8; 32]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> FromZeroes for [T; N]
where\n T: FromZeroes,

§

fn zero(&mut self)

Overwrites self with zeroes. Read more
§

fn new_zeroed() -> Self
where\n Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
","FromZeroes","iroh::docs::PeerIdBytes"],["
§

impl<T> Hash for [T; 32]
where\n T: Hash,

§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher.
§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher.
","Hash","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Hash for [T; N]
where\n T: Hash,

The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","iroh::docs::PeerIdBytes"],["
1.50.0 · source§

impl<T, I, const N: usize> Index<I> for [T; N]
where\n [T]: Index<I>,

§

type Output = <[T] as Index<I>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","iroh::docs::PeerIdBytes"],["
1.50.0 · source§

impl<T, I, const N: usize> IndexMut<I> for [T; N]
where\n [T]: IndexMut<I>,

source§

fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","iroh::docs::PeerIdBytes"],["
§

impl InputLength for [u8; 32]

§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","InputLength","iroh::docs::PeerIdBytes"],["
1.53.0 · source§

impl<T, const N: usize> IntoIterator for [T; N]

source§

fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

\n

Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, N>

Which kind of iterator are we turning this into?
","IntoIterator","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> IntoResponse for [u8; N]

§

fn into_response(self) -> Response<Body>

Create a response.
","IntoResponse","iroh::docs::PeerIdBytes"],["
§

impl<Fut, const N: usize> Join for [Fut; N]
where\n Fut: IntoFuture,

§

type Output = [<Fut as IntoFuture>::Output; N]

The resulting output type.
§

type Future = Join<<Fut as IntoFuture>::IntoFuture, N>

The Future implementation returned by this method.
§

fn join(self) -> <[Fut; N] as Join>::Future

Waits for multiple futures to complete. Read more
","Join","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> Key for [T; N]
where\n T: Key,

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
","Key","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> MaxSize for [T; N]
where\n T: MaxSize,

§

const POSTCARD_MAX_SIZE: usize = _

The maximum possible size that the serialization of this\ntype can have, in bytes.
","MaxSize","iroh::docs::PeerIdBytes"],["
§

impl<S, const N: usize> Merge for [S; N]
where\n S: IntoStream,

§

type Item = <Merge<<S as IntoStream>::IntoStream, N> as Stream>::Item

The resulting output type.
§

type Stream = Merge<<S as IntoStream>::IntoStream, N>

The stream type.
§

fn merge(self) -> <[S; N] as Merge>::Stream

Combine multiple streams into a single stream.
","Merge","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Ord for [T; N]
where\n T: Ord,

Implements comparison of arrays lexicographically.

\n
source§

fn cmp(&self, other: &[T; N]) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","iroh::docs::PeerIdBytes"],["
§

impl PartialEq<Cookie> for [u8; 4]

§

fn eq(&self, other: &Cookie) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","iroh::docs::PeerIdBytes"],["
§

impl<A, B, const N: usize, const M: usize> PartialEq<Vec<A, N>> for [B; M]
where\n A: PartialEq<B>,

§

fn eq(&self, other: &Vec<A, N>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> PartialOrd for [T; N]
where\n T: PartialOrd,

Implements comparison of arrays lexicographically.

\n
source§

fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &[T; N]) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &[T; N]) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
source§

fn ge(&self, other: &[T; N]) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
source§

fn gt(&self, other: &[T; N]) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
","PartialOrd","iroh::docs::PeerIdBytes"],["
§

impl<Fut, const N: usize> Race for [Fut; N]
where\n Fut: IntoFuture,

§

type Output = <Fut as IntoFuture>::Output

The resulting output type.
§

type Future = Race<<Fut as IntoFuture>::IntoFuture, N>

Which kind of future are we turning this into?
§

fn race(self) -> <[Fut; N] as Race>::Future

Wait for the first future to complete. Read more
","Race","iroh::docs::PeerIdBytes"],["
§

impl<Fut, T, E, const N: usize> RaceOk for [Fut; N]
where\n Fut: IntoFuture<Output = Result<T, E>>,

§

type Output = T

The resulting output type.
§

type Error = AggregateError<E, N>

The resulting error type.
§

type Future = RaceOk<<Fut as IntoFuture>::IntoFuture, T, E, N>

Which kind of future are we turning this into?
§

fn race_ok(self) -> <[Fut; N] as RaceOk>::Future

Waits for the first successful future to complete.
","RaceOk","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> Schema for [T; N]
where\n T: Schema,

§

const SCHEMA: &'static NamedType = _

A recursive data structure that describes the schema of the given\ntype.
","Schema","iroh::docs::PeerIdBytes"],["
source§

impl<T> Serialize for [T; 32]
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","iroh::docs::PeerIdBytes"],["
source§

impl<const N: usize> Serialize for [u8; N]

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

","Serialize","iroh::docs::PeerIdBytes"],["
1.51.0 · source§

impl<T, const N: usize> SlicePattern for [T; N]

§

type Item = T

🔬This is a nightly-only experimental API. (slice_pattern)
The element type of the slice being matched on.
source§

fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

🔬This is a nightly-only experimental API. (slice_pattern)
Currently, the consumers of SlicePattern need a slice.
","SlicePattern","iroh::docs::PeerIdBytes"],["
1.34.0 · source§

impl<T, const N: usize> TryFrom<&[T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

\n\n
let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&[T]>","iroh::docs::PeerIdBytes"],["
1.59.0 · source§

impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

\n\n
let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&mut [T]>","iroh::docs::PeerIdBytes"],["
§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","iroh::docs::PeerIdBytes"],["
1.48.0 · source§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

source§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","iroh::docs::PeerIdBytes"],["
§

impl<Fut, T, E, const N: usize> TryJoin for [Fut; N]
where\n Fut: IntoFuture<Output = Result<T, E>>,

§

type Output = [T; N]

The resulting output type.
§

type Error = E

The resulting error type.
§

type Future = TryJoin<<Fut as IntoFuture>::IntoFuture, T, E, N>

Which kind of future are we turning this into?
§

fn try_join(self) -> <[Fut; N] as TryJoin>::Future

Waits for multiple futures to complete, either returning when all\nfutures complete successfully, or return early when any future completes\nwith an error.
","TryJoin","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> Value for [T; N]
where\n T: Value,

§

type SelfType<'a> = [<T as Value>::SelfType<'a>; N]\nwhere\n [T; N]: 'a

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Vec<u8>\nwhere\n [T; N]: 'a

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> [<T as Value>::SelfType<'a>; N]
where\n [T; N]: 'a,

Deserializes data\nImplementations may return a view over data, or an owned type
§

fn as_bytes<'a, 'b>(value: &'a <[T; N] as Value>::SelfType<'b>) -> Vec<u8>
where\n 'b: 'a,\n [T; N]: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
","Value","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> ValueOrd for [T; N]
where\n T: DerOrd,

§

fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
","ValueOrd","iroh::docs::PeerIdBytes"],["
§

impl<Z, const N: usize> Zeroize for [Z; N]
where\n Z: Zeroize,

Impl [Zeroize] on arrays of types that impl [Zeroize].

\n
§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
","Zeroize","iroh::docs::PeerIdBytes"],["
§

impl<S, const N: usize> Zip for [S; N]
where\n S: IntoStream,

§

type Item = <Zip<<S as IntoStream>::IntoStream, N> as Stream>::Item

What’s the return type of our stream?
§

type Stream = Zip<<S as IntoStream>::IntoStream, N>

What stream do we return?
§

fn zip(self) -> <[S; N] as Zip>::Stream

Combine multiple streams into a single stream.
","Zip","iroh::docs::PeerIdBytes"],["
source§

impl<T, const N: usize> ConstParamTy for [T; N]
where\n T: ConstParamTy,

","ConstParamTy","iroh::docs::PeerIdBytes"],["
1.58.0 · source§

impl<T, const N: usize> Copy for [T; N]
where\n T: Copy,

","Copy","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Eq for [T; N]
where\n T: Eq,

","Eq","iroh::docs::PeerIdBytes"],["
source§

impl<T, const N: usize> StructuralPartialEq for [T; N]

","StructuralPartialEq","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> Unaligned for [T; N]
where\n T: Unaligned,

","Unaligned","iroh::docs::PeerIdBytes"],["
§

impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
where\n Z: ZeroizeOnDrop,

Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

\n
","ZeroizeOnDrop","iroh::docs::PeerIdBytes"]], "iroh_docs":[["
source§

impl<T, const N: usize> [T; N]

1.55.0 · source

pub fn map<F, U>(self, f: F) -> [U; N]
where\n F: FnMut(T) -> U,

Returns an array of the same size as self, with function f applied to each element\nin order.

\n

If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

\n
§Note on performance and stack usage
\n

Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

\n

Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

\n

In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

\n
§Examples
\n
let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
\n
source

pub fn try_map<F, R>(\n self,\n f: F\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
where\n F: FnMut(T) -> R,\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

🔬This is a nightly-only experimental API. (array_try_map)

A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

\n

The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

\n
§Examples
\n
#![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
\n
1.57.0 (const: 1.57.0) · source

pub const fn as_slice(&self) -> &[T]

Returns a slice containing the entire array. Equivalent to &s[..].

\n
1.57.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

\n
1.77.0 · source

pub fn each_ref(&self) -> [&T; N]

Borrows each element and returns an array of references with the same\nsize as self.

\n
§Example
\n
let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
\n

This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

\n\n
let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
\n
1.77.0 · source

pub fn each_mut(&mut self) -> [&mut T; N]

Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

\n
§Example
\n
\nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
\n
source

pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
\n
source

pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
source

pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
\n
source

pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
",0,"iroh_docs::sync::PeerIdBytes"],["
source§

impl<const N: usize> [u8; N]

source

pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

\n
§Examples
\n
#![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
\n
source

pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

\n
§Safety
\n

Every byte in the array must be in 0..=127, or else this is UB.

\n
",0,"iroh_docs::sync::PeerIdBytes"],["
§

impl<T> Array for [T; 32]
where\n T: Default,

§

type Item = T

The type of the items in the thing.
§

const CAPACITY: usize = 32usize

The number of slots in the thing.
§

fn as_slice(&self) -> &[T]

Gives a shared slice over the whole thing. Read more
§

fn as_slice_mut(&mut self) -> &mut [T]

Gives a unique slice over the whole thing. Read more
§

fn default() -> [T; 32]

Create a default-initialized instance of ourself, similar to the\nDefault trait, but implemented for the same range of sizes as\n[Array].
","Array","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> Array for [T; N]

§

type Item = T

The type of the array’s elements.
§

fn size() -> usize

Returns the number of items the array can hold.
","Array","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize, T> AsBytes for [T; N]
where\n T: AsBytes,

§

fn as_bytes(&self) -> &[u8]

Gets the bytes of this value. Read more
§

fn write_to(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to bytes. Read more
§

fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the prefix of bytes. Read more
§

fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the suffix of bytes. Read more
","AsBytes","iroh_docs::sync::PeerIdBytes"],["
§

impl AsBytes for [u8; 32]

§

fn as_bytes(&self) -> &[u8]

Casts the input type to a byte slice
","AsBytes","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsMut<[T]> for [T; N]

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsRef<[T]> for [T; N]

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> BitView for [T; N]
where\n T: BitStore,

Note that overly-large arrays may cause the conversions to fail.

\n
§

type Store = T

The underlying element type.
§

fn view_bits<O>(&self) -> &BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as an immutable bit-slice.
§

fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as an immutable bit-slice. Read more
§

fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as a mutable bit-slice.
§

fn try_view_bits_mut<O>(\n &mut self\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as a mutable bit-slice. Read more
","BitView","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> BitViewSized for [T; N]
where\n T: BitStore,

§

const ZERO: [T; N] = _

The zero constant.
§

fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

Views the type as a slice of its elements.
§

fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

Views the type as a mutable slice of its elements.
§

fn into_bitarray<O>(self) -> BitArray<Self, O>
where\n O: BitOrder,

Wraps self in a BitArray.
","BitViewSized","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> Borrow<[T]> for [T; N]

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> BorrowMut<[T]> for [T; N]

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","iroh_docs::sync::PeerIdBytes"],["
§

impl<S, const N: usize> Chain for [S; N]
where\n S: Stream,

§

type Item = <S as Stream>::Item

What’s the return type of our stream?
§

type Stream = Chain<S, N>

What stream do we return?
§

fn chain(self) -> <[S; N] as Chain>::Stream

Combine multiple streams into a single stream.
","Chain","iroh_docs::sync::PeerIdBytes"],["
1.58.0 · source§

impl<T, const N: usize> Clone for [T; N]
where\n T: Clone,

source§

fn clone(&self) -> [T; N]

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &[T; N])

Performs copy-assignment from source. Read more
","Clone","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Debug for [T; N]
where\n T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize> Decode for [u8; N]

Decodes a byte array from byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

type Error = Error

Type returned in the event of a decoding error.
§

fn decode(reader: &mut impl Reader) -> Result<[u8; N], Error>

Attempt to decode a value of this type using the provided [Reader].
","Decode","iroh_docs::sync::PeerIdBytes"],["
§

impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
where\n T: Decode<'a>,

§

fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
where\n R: Reader<'a>,

Attempt to decode this message using the provided [Reader].
","DecodeValue<'a>","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 32]
where\n T: Default,

source§

fn default() -> [T; 32]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 31]
where\n T: Default,

source§

fn default() -> [T; 31]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 30]
where\n T: Default,

source§

fn default() -> [T; 30]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 29]
where\n T: Default,

source§

fn default() -> [T; 29]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 28]
where\n T: Default,

source§

fn default() -> [T; 28]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 27]
where\n T: Default,

source§

fn default() -> [T; 27]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 26]
where\n T: Default,

source§

fn default() -> [T; 26]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 25]
where\n T: Default,

source§

fn default() -> [T; 25]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 24]
where\n T: Default,

source§

fn default() -> [T; 24]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 23]
where\n T: Default,

source§

fn default() -> [T; 23]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 22]
where\n T: Default,

source§

fn default() -> [T; 22]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 21]
where\n T: Default,

source§

fn default() -> [T; 21]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 20]
where\n T: Default,

source§

fn default() -> [T; 20]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 19]
where\n T: Default,

source§

fn default() -> [T; 19]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 18]
where\n T: Default,

source§

fn default() -> [T; 18]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 17]
where\n T: Default,

source§

fn default() -> [T; 17]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 16]
where\n T: Default,

source§

fn default() -> [T; 16]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 15]
where\n T: Default,

source§

fn default() -> [T; 15]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 14]
where\n T: Default,

source§

fn default() -> [T; 14]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 13]
where\n T: Default,

source§

fn default() -> [T; 13]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 12]
where\n T: Default,

source§

fn default() -> [T; 12]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 11]
where\n T: Default,

source§

fn default() -> [T; 11]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 10]
where\n T: Default,

source§

fn default() -> [T; 10]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 9]
where\n T: Default,

source§

fn default() -> [T; 9]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 8]
where\n T: Default,

source§

fn default() -> [T; 8]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 7]
where\n T: Default,

source§

fn default() -> [T; 7]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 6]
where\n T: Default,

source§

fn default() -> [T; 6]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 5]
where\n T: Default,

source§

fn default() -> [T; 5]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 4]
where\n T: Default,

source§

fn default() -> [T; 4]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 3]
where\n T: Default,

source§

fn default() -> [T; 3]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 2]
where\n T: Default,

source§

fn default() -> [T; 2]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 1]
where\n T: Default,

source§

fn default() -> [T; 1]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 0]

source§

fn default() -> [T; 0]

Returns the “default value” for a type. Read more
","Default","iroh_docs::sync::PeerIdBytes"],["
source§

impl<'de, T> Deserialize<'de> for [T; 32]
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh_docs::sync::PeerIdBytes"],["
source§

impl<'de, const N: usize> Deserialize<'de> for [u8; N]

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

","Deserialize<'de>","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize> Encode for [u8; N]

Encodes [u8; N] into byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

fn encoded_len(&self) -> Result<usize, Error>

Get the length of this type encoded in bytes, prior to Base64 encoding.
§

fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value using the provided [Writer].
§

fn encoded_len_prefixed(&self) -> Result<usize, Error>

Return the length of this type after encoding when prepended with a\nuint32 length prefix.
§

fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value, first prepending a uint32 length prefix\nset to [Encode::encoded_len].
","Encode","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeLabelSet for [T; N]
where\n T: EncodeLabel,

§

fn encode(&self, encoder: LabelSetEncoder<'_>) -> Result<(), Error>

Encode oneself into the given encoder.
","EncodeLabelSet","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeValue for [T; N]
where\n T: Encode,

§

fn value_len(&self) -> Result<Length, Error>

Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
§

fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
§

fn header(&self) -> Result<Header, Error>
where\n Self: Tagged,

Get the [Header] used to encode this value.
","EncodeValue","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 32]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 31]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 30]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 29]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 28]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 27]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 26]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 25]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 24]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 23]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 22]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 21]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 20]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 19]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 18]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 17]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 16]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 15]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 14]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 13]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 12]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 11]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 10]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 9]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 8]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 7]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 6]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 5]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 4]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 3]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 0]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2048]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1024]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 512]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 256]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 128]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Fill for [T; 64]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh_docs::sync::PeerIdBytes"],["
§

impl<'a> FindToken<&'a u8> for [u8; 32]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","iroh_docs::sync::PeerIdBytes"],["
§

impl FindToken<u8> for [u8; 32]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> FixedTag for [T; N]

§

const TAG: Tag = Tag::Sequence

ASN.1 tag
","FixedTag","iroh_docs::sync::PeerIdBytes"],["
§

impl From<&Signature> for [u8; 64]

§

fn from(sig: &Signature) -> [u8; 64]

Converts to this type from the input type.
","From<&Signature>","iroh_docs::sync::PeerIdBytes"],["
source§

impl From<AuthorId> for [u8; 32]

source§

fn from(value: AuthorId) -> Self

Converts to this type from the input type.
","From","iroh_docs::sync::PeerIdBytes"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>\n) -> [T; 32]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>>>","iroh_docs::sync::PeerIdBytes"],["
§

impl From<Hash> for [u8; 32]

§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
","From","iroh_docs::sync::PeerIdBytes"],["
§

impl From<Hash> for [u8; 32]

§

fn from(hash: Hash) -> [u8; 32]

Converts to this type from the input type.
","From","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize, const UPPERCASE: bool> From<HexOrBin<N, UPPERCASE>> for [u8; N]

§

fn from(hex_or_bin: HexOrBin<N, UPPERCASE>) -> [u8; N]

Converts to this type from the input type.
","From>","iroh_docs::sync::PeerIdBytes"],["
§

impl From<MacAddr> for [u8; 6]

§

fn from(addr: MacAddr) -> [u8; 6]

Converts to this type from the input type.
","From","iroh_docs::sync::PeerIdBytes"],["
source§

impl From<NamespaceId> for [u8; 32]

source§

fn from(value: NamespaceId) -> Self

Converts to this type from the input type.
","From","iroh_docs::sync::PeerIdBytes"],["
§

impl From<Signature> for [u8; 64]

§

fn from(sig: Signature) -> [u8; 64]

Converts to this type from the input type.
","From","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T, const N: usize> From<Simd<T, N>> for [T; N]

source§

fn from(vector: Simd<T, N>) -> [T; N]

Converts to this type from the input type.
","From>","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize, T> FromBytes for [T; N]
where\n T: FromBytes,

§

fn ref_from(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the given bytes as a &Self without copying. Read more
§

fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &Self without copying. Read more
§

fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &Self without copying. Read more
§

fn slice_from(bytes: &[u8]) -> Option<&[Self]>
where\n Self: Sized,

Interprets the given bytes as a &[Self] without copying. Read more
§

fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn read_from(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from bytes. Read more
§

fn read_from_prefix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the prefix of bytes. Read more
§

fn read_from_suffix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the suffix of bytes. Read more
","FromBytes","iroh_docs::sync::PeerIdBytes"],["
source§

impl FromHex for [u8; 32]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize, T> FromZeroes for [T; N]
where\n T: FromZeroes,

§

fn zero(&mut self)

Overwrites self with zeroes. Read more
§

fn new_zeroed() -> Self
where\n Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
","FromZeroes","iroh_docs::sync::PeerIdBytes"],["
§

impl<T> Hash for [T; 32]
where\n T: Hash,

§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher.
§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher.
","Hash","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Hash for [T; N]
where\n T: Hash,

The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","iroh_docs::sync::PeerIdBytes"],["
1.50.0 · source§

impl<T, I, const N: usize> Index<I> for [T; N]
where\n [T]: Index<I>,

§

type Output = <[T] as Index<I>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","iroh_docs::sync::PeerIdBytes"],["
1.50.0 · source§

impl<T, I, const N: usize> IndexMut<I> for [T; N]
where\n [T]: IndexMut<I>,

source§

fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","iroh_docs::sync::PeerIdBytes"],["
§

impl InputLength for [u8; 32]

§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","InputLength","iroh_docs::sync::PeerIdBytes"],["
1.53.0 · source§

impl<T, const N: usize> IntoIterator for [T; N]

source§

fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

\n

Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, N>

Which kind of iterator are we turning this into?
","IntoIterator","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize> IntoResponse for [u8; N]

§

fn into_response(self) -> Response<Body>

Create a response.
","IntoResponse","iroh_docs::sync::PeerIdBytes"],["
§

impl<Fut, const N: usize> Join for [Fut; N]
where\n Fut: IntoFuture,

§

type Output = [<Fut as IntoFuture>::Output; N]

The resulting output type.
§

type Future = Join<<Fut as IntoFuture>::IntoFuture, N>

The Future implementation returned by this method.
§

fn join(self) -> <[Fut; N] as Join>::Future

Waits for multiple futures to complete. Read more
","Join","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize, T> Key for [T; N]
where\n T: Key,

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
","Key","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> MaxSize for [T; N]
where\n T: MaxSize,

§

const POSTCARD_MAX_SIZE: usize = _

The maximum possible size that the serialization of this\ntype can have, in bytes.
","MaxSize","iroh_docs::sync::PeerIdBytes"],["
§

impl<S, const N: usize> Merge for [S; N]
where\n S: IntoStream,

§

type Item = <Merge<<S as IntoStream>::IntoStream, N> as Stream>::Item

The resulting output type.
§

type Stream = Merge<<S as IntoStream>::IntoStream, N>

The stream type.
§

fn merge(self) -> <[S; N] as Merge>::Stream

Combine multiple streams into a single stream.
","Merge","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Ord for [T; N]
where\n T: Ord,

Implements comparison of arrays lexicographically.

\n
source§

fn cmp(&self, other: &[T; N]) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","iroh_docs::sync::PeerIdBytes"],["
§

impl PartialEq<Cookie> for [u8; 4]

§

fn eq(&self, other: &Cookie) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","iroh_docs::sync::PeerIdBytes"],["
§

impl<A, B, const N: usize, const M: usize> PartialEq<Vec<A, N>> for [B; M]
where\n A: PartialEq<B>,

§

fn eq(&self, other: &Vec<A, N>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> PartialOrd for [T; N]
where\n T: PartialOrd,

Implements comparison of arrays lexicographically.

\n
source§

fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &[T; N]) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &[T; N]) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
source§

fn ge(&self, other: &[T; N]) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
source§

fn gt(&self, other: &[T; N]) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
","PartialOrd","iroh_docs::sync::PeerIdBytes"],["
§

impl<Fut, const N: usize> Race for [Fut; N]
where\n Fut: IntoFuture,

§

type Output = <Fut as IntoFuture>::Output

The resulting output type.
§

type Future = Race<<Fut as IntoFuture>::IntoFuture, N>

Which kind of future are we turning this into?
§

fn race(self) -> <[Fut; N] as Race>::Future

Wait for the first future to complete. Read more
","Race","iroh_docs::sync::PeerIdBytes"],["
§

impl<Fut, T, E, const N: usize> RaceOk for [Fut; N]
where\n Fut: IntoFuture<Output = Result<T, E>>,

§

type Output = T

The resulting output type.
§

type Error = AggregateError<E, N>

The resulting error type.
§

type Future = RaceOk<<Fut as IntoFuture>::IntoFuture, T, E, N>

Which kind of future are we turning this into?
§

fn race_ok(self) -> <[Fut; N] as RaceOk>::Future

Waits for the first successful future to complete.
","RaceOk","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> Schema for [T; N]
where\n T: Schema,

§

const SCHEMA: &'static NamedType = _

A recursive data structure that describes the schema of the given\ntype.
","Schema","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T> Serialize for [T; 32]
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","iroh_docs::sync::PeerIdBytes"],["
source§

impl<const N: usize> Serialize for [u8; N]

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

","Serialize","iroh_docs::sync::PeerIdBytes"],["
1.51.0 · source§

impl<T, const N: usize> SlicePattern for [T; N]

§

type Item = T

🔬This is a nightly-only experimental API. (slice_pattern)
The element type of the slice being matched on.
source§

fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

🔬This is a nightly-only experimental API. (slice_pattern)
Currently, the consumers of SlicePattern need a slice.
","SlicePattern","iroh_docs::sync::PeerIdBytes"],["
1.34.0 · source§

impl<T, const N: usize> TryFrom<&[T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

\n\n
let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&[T]>","iroh_docs::sync::PeerIdBytes"],["
1.59.0 · source§

impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

\n\n
let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&mut [T]>","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","iroh_docs::sync::PeerIdBytes"],["
1.48.0 · source§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

source§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","iroh_docs::sync::PeerIdBytes"],["
§

impl<Fut, T, E, const N: usize> TryJoin for [Fut; N]
where\n Fut: IntoFuture<Output = Result<T, E>>,

§

type Output = [T; N]

The resulting output type.
§

type Error = E

The resulting error type.
§

type Future = TryJoin<<Fut as IntoFuture>::IntoFuture, T, E, N>

Which kind of future are we turning this into?
§

fn try_join(self) -> <[Fut; N] as TryJoin>::Future

Waits for multiple futures to complete, either returning when all\nfutures complete successfully, or return early when any future completes\nwith an error.
","TryJoin","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize, T> Value for [T; N]
where\n T: Value,

§

type SelfType<'a> = [<T as Value>::SelfType<'a>; N]\nwhere\n [T; N]: 'a

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = Vec<u8>\nwhere\n [T; N]: 'a

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> [<T as Value>::SelfType<'a>; N]
where\n [T; N]: 'a,

Deserializes data\nImplementations may return a view over data, or an owned type
§

fn as_bytes<'a, 'b>(value: &'a <[T; N] as Value>::SelfType<'b>) -> Vec<u8>
where\n 'b: 'a,\n [T; N]: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
","Value","iroh_docs::sync::PeerIdBytes"],["
§

impl<T, const N: usize> ValueOrd for [T; N]
where\n T: DerOrd,

§

fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
","ValueOrd","iroh_docs::sync::PeerIdBytes"],["
§

impl<Z, const N: usize> Zeroize for [Z; N]
where\n Z: Zeroize,

Impl [Zeroize] on arrays of types that impl [Zeroize].

\n
§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
","Zeroize","iroh_docs::sync::PeerIdBytes"],["
§

impl<S, const N: usize> Zip for [S; N]
where\n S: IntoStream,

§

type Item = <Zip<<S as IntoStream>::IntoStream, N> as Stream>::Item

What’s the return type of our stream?
§

type Stream = Zip<<S as IntoStream>::IntoStream, N>

What stream do we return?
§

fn zip(self) -> <[S; N] as Zip>::Stream

Combine multiple streams into a single stream.
","Zip","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T, const N: usize> ConstParamTy for [T; N]
where\n T: ConstParamTy,

","ConstParamTy","iroh_docs::sync::PeerIdBytes"],["
1.58.0 · source§

impl<T, const N: usize> Copy for [T; N]
where\n T: Copy,

","Copy","iroh_docs::sync::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Eq for [T; N]
where\n T: Eq,

","Eq","iroh_docs::sync::PeerIdBytes"],["
source§

impl<T, const N: usize> StructuralPartialEq for [T; N]

","StructuralPartialEq","iroh_docs::sync::PeerIdBytes"],["
§

impl<const N: usize, T> Unaligned for [T; N]
where\n T: Unaligned,

","Unaligned","iroh_docs::sync::PeerIdBytes"],["
§

impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
where\n Z: ZeroizeOnDrop,

Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

\n
","ZeroizeOnDrop","iroh_docs::sync::PeerIdBytes"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file