From 4bf2d2b1535364ea9556398ae6fd3e469fb7bad7 Mon Sep 17 00:00:00 2001 From: ramfox Date: Fri, 20 Sep 2024 17:05:27 +0000 Subject: [PATCH] deploy: 20d589a8bbd2a25408ea8f009587a8877e69d3d6 --- pr/2656/docs/help.html | 2 +- .../base32/enum.HexOrBase32ParseError.html | 4 +- pr/2656/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/2656/docs/iroh/base/base32/index.html | 2 +- .../iroh/base/base32/struct.DecodeError.html | 2 +- .../docs/iroh/base/hash/enum.BlobFormat.html | 24 ++--- pr/2656/docs/iroh/base/hash/index.html | 2 +- pr/2656/docs/iroh/base/hash/struct.Hash.html | 38 +++---- .../iroh/base/hash/struct.HashAndFormat.html | 30 +++--- pr/2656/docs/iroh/base/index.html | 2 +- .../iroh/base/key/enum.KeyParsingError.html | 4 +- pr/2656/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/2656/docs/iroh/base/key/type.NodeId.html | 2 +- .../base/node_addr/enum.AddrInfoOptions.html | 12 +-- pr/2656/docs/iroh/base/node_addr/index.html | 2 +- .../iroh/base/node_addr/struct.AddrInfo.html | 18 ++-- .../iroh/base/node_addr/struct.NodeAddr.html | 32 +++--- .../iroh/base/node_addr/struct.RelayUrl.html | 20 ++-- pr/2656/docs/iroh/base/rpc/index.html | 2 +- .../docs/iroh/base/rpc/struct.RpcError.html | 6 +- .../docs/iroh/base/rpc/type.RpcResult.html | 2 +- pr/2656/docs/iroh/base/ticket/enum.Error.html | 4 +- pr/2656/docs/iroh/base/ticket/index.html | 2 +- .../iroh/base/ticket/struct.BlobTicket.html | 22 ++--- .../iroh/base/ticket/struct.NodeTicket.html | 18 ++-- .../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 +- .../iroh/blobs/downloader/enum.GetOutput.html | 6 +- pr/2656/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 | 14 +-- .../iroh/blobs/downloader/trait.Getter.html | 8 +- .../blobs/downloader/trait.NeedsConn.html | 6 +- pr/2656/docs/iroh/blobs/enum.BlobFormat.html | 24 ++--- .../blobs/export/enum.ExportProgress.html | 6 +- pr/2656/docs/iroh/blobs/export/fn.export.html | 2 +- .../iroh/blobs/export/fn.export_blob.html | 2 +- .../blobs/export/fn.export_collection.html | 2 +- pr/2656/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/2656/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/enum.GetState.html | 4 +- .../docs/iroh/blobs/get/db/fn.blob_info.html | 2 +- .../docs/iroh/blobs/get/db/fn.get_to_db.html | 2 +- .../blobs/get/db/fn.get_to_db_in_steps.html | 2 +- .../iroh/blobs/get/db/fn.valid_ranges.html | 2 +- pr/2656/docs/iroh/blobs/get/db/index.html | 2 +- .../get/db/struct.GetStateNeedsConn.html | 6 +- .../iroh/blobs/get/enum.GetResponseError.html | 4 +- .../iroh/blobs/get/error/enum.GetError.html | 4 +- pr/2656/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/2656/docs/iroh/blobs/get/fsm/fn.start.html | 2 +- pr/2656/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/2656/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/2656/docs/iroh/blobs/get/struct.Stats.html | 12 +-- .../iroh/blobs/hashseq/fn.parse_hash_seq.html | 2 +- pr/2656/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/2656/docs/iroh/blobs/index.html | 2 +- pr/2656/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/2656/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 +- .../provider/enum.BatchAddPathProgress.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 +- pr/2656/docs/iroh/blobs/provider/index.html | 2 +- .../blobs/provider/struct.EventSender.html | 12 +-- .../blobs/provider/struct.ResponseWriter.html | 4 +- .../blobs/provider/struct.TransferStats.html | 4 +- .../provider/trait.CustomEventSender.html | 6 +- .../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/2656/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 | 10 +- .../iroh/blobs/store/enum.ImportProgress.html | 4 +- .../iroh/blobs/store/enum.ReportLevel.html | 14 +-- .../blobs/store/enum.ValidateProgress.html | 6 +- pr/2656/docs/iroh/blobs/store/fs/index.html | 2 +- .../blobs/store/fs/struct.BatchOptions.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 | 48 ++++----- .../docs/iroh/blobs/store/fs/type.Entry.html | 2 +- pr/2656/docs/iroh/blobs/store/index.html | 2 +- pr/2656/docs/iroh/blobs/store/mem/index.html | 2 +- .../iroh/blobs/store/mem/struct.Entry.html | 4 +- .../iroh/blobs/store/mem/struct.Store.html | 32 +++--- .../iroh/blobs/store/readonly_mem/index.html | 2 +- .../store/readonly_mem/struct.Entry.html | 4 +- .../store/readonly_mem/struct.Store.html | 42 ++++---- .../iroh/blobs/store/struct.GcConfig.html | 4 +- .../blobs/store/trait.BaoBatchWriter.html | 12 +-- pr/2656/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 | 28 +++--- .../docs/iroh/blobs/store/type.DbIter.html | 2 +- .../blobs/store/type.ExportProgressCb.html | 2 +- pr/2656/docs/iroh/blobs/struct.Hash.html | 38 +++---- .../docs/iroh/blobs/struct.HashAndFormat.html | 30 +++--- pr/2656/docs/iroh/blobs/struct.Tag.html | 24 ++--- pr/2656/docs/iroh/blobs/struct.TempTag.html | 16 +-- .../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/2656/docs/iroh/blobs/util/index.html | 2 +- pr/2656/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.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 | 38 +++---- .../progress/type.ProgressSendResult.html | 2 +- .../iroh/blobs/util/struct.SparseMemFile.html | 14 +-- pr/2656/docs/iroh/blobs/util/struct.Tag.html | 24 ++--- .../docs/iroh/blobs/util/struct.TempTag.html | 16 +-- .../iroh/blobs/util/trait.TagCounter.html | 10 +- .../docs/iroh/blobs/util/trait.TagDrop.html | 6 +- .../client/gossip/enum.SubscribeResponse.html | 10 +- .../client/gossip/enum.SubscribeUpdate.html | 6 +- .../iroh/docs/metrics/struct.Metrics.html | 42 ++++---- pr/2656/docs/iroh/docs/struct.AuthorId.html | 2 +- .../iroh/docs/struct.AuthorPublicKey.html | 2 +- pr/2656/docs/iroh/docs/struct.DocTicket.html | 2 +- .../docs/iroh/docs/struct.NamespaceId.html | 2 +- .../iroh/docs/struct.NamespacePublicKey.html | 2 +- pr/2656/docs/iroh/gossip/index.html | 2 +- pr/2656/docs/iroh/gossip/metrics/index.html | 2 +- .../iroh/gossip/metrics/struct.Metrics.html | 42 ++++---- .../iroh/gossip/net/constant.GOSSIP_ALPN.html | 2 +- .../docs/iroh/gossip/net/enum.Command.html | 6 +- pr/2656/docs/iroh/gossip/net/enum.Event.html | 10 +- .../iroh/gossip/net/enum.GossipEvent.html | 14 +-- pr/2656/docs/iroh/gossip/net/index.html | 2 +- .../docs/iroh/gossip/net/struct.Gossip.html | 16 +-- .../gossip/net/struct.GossipReceiver.html | 10 +- .../iroh/gossip/net/struct.GossipSender.html | 10 +- .../iroh/gossip/net/struct.GossipTopic.html | 14 +-- .../iroh/gossip/net/struct.JoinOptions.html | 8 +- .../docs/iroh/gossip/net/struct.Message.html | 14 +-- .../iroh/gossip/net/type.CommandStream.html | 2 +- .../iroh/gossip/net/type.ProtoCommand.html | 2 +- .../docs/iroh/gossip/net/type.ProtoEvent.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/2656/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/2656/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/2656/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/2656/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.Connection.html | 2 +- .../iroh/net/endpoint/struct.NodeAddr.html | 32 +++--- .../docs/iroh/net/endpoint/struct.VarInt.html | 4 +- .../iroh/net/key/enum.KeyParsingError.html | 4 +- pr/2656/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/2656/docs/iroh/net/key/type.NodeId.html | 2 +- .../net/metrics/struct.MagicsockMetrics.html | 98 +++++++++---------- .../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/2656/docs/iroh/net/struct.AddrInfo.html | 18 ++-- pr/2656/docs/iroh/net/struct.NodeAddr.html | 32 +++--- .../iroh/net/ticket/struct.NodeTicket.html | 18 ++-- pr/2656/docs/iroh/net/type.NodeId.html | 2 +- .../downloader/struct.DownloadRequest.html | 2 +- .../downloader/struct.Downloader.html | 2 +- .../iroh_blobs/downloader/trait.Dialer.html | 16 +-- pr/2656/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 +- .../provider/enum.BatchAddPathProgress.html | 4 +- .../store/enum.ConsistencyCheckProgress.html | 4 +- .../store/enum.ValidateProgress.html | 4 +- pr/2656/docs/iroh_blobs/struct.Hash.html | 34 +++---- .../docs/iroh_blobs/struct.HashAndFormat.html | 28 +++--- .../iroh_docs/actor/struct.SyncHandle.html | 2 +- .../docs/iroh_docs/engine/enum.LiveEvent.html | 16 +-- .../engine/fn.entry_to_content_status.html | 2 +- pr/2656/docs/iroh_docs/engine/index.html | 2 +- .../docs/iroh_docs/engine/struct.Engine.html | 8 +- .../iroh_docs/engine/struct.SyncEvent.html | 4 +- pr/2656/docs/iroh_docs/index.html | 2 +- .../iroh_docs/metrics/struct.Metrics.html | 42 ++++---- .../docs/iroh_docs/net/enum.AcceptError.html | 16 +-- .../iroh_docs/net/fn.connect_and_sync.html | 2 +- .../iroh_docs/net/fn.handle_connection.html | 2 +- .../iroh_docs/net/struct.SyncFinished.html | 4 +- .../fs/struct.ContentHashesIterator.html | 2 +- pr/2656/docs/iroh_docs/struct.AuthorId.html | 2 +- .../iroh_docs/struct.AuthorPublicKey.html | 2 +- pr/2656/docs/iroh_docs/struct.DocTicket.html | 10 +- .../docs/iroh_docs/struct.NamespaceId.html | 2 +- .../iroh_docs/struct.NamespacePublicKey.html | 2 +- pr/2656/docs/iroh_docs/sync/struct.Entry.html | 4 +- .../docs/iroh_docs/sync/struct.Record.html | 6 +- .../docs/iroh_docs/sync/struct.Replica.html | 4 +- .../iroh_docs/sync/struct.SignedEntry.html | 4 +- .../sync/type.ContentStatusCallback.html | 2 +- .../iroh_gossip/metrics/struct.Metrics.html | 40 ++++---- .../docs/iroh_gossip/net/enum.Command.html | 4 +- .../iroh_gossip/net/enum.GossipEvent.html | 14 +-- .../docs/iroh_gossip/net/struct.Gossip.html | 6 +- .../net/struct.GossipReceiver.html | 2 +- .../iroh_gossip/net/struct.GossipSender.html | 2 +- .../iroh_gossip/net/struct.JoinOptions.html | 6 +- .../docs/iroh_gossip/net/struct.Message.html | 4 +- .../iroh_gossip/net/type.ProtoCommand.html | 6 +- .../docs/iroh_gossip/net/type.ProtoEvent.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 +- .../iroh_net/endpoint/struct.AddrInfo.html | 18 ++-- .../iroh_net/endpoint/struct.NodeAddr.html | 32 +++--- .../iroh_net/key/enum.KeyParsingError.html | 8 +- pr/2656/docs/iroh_net/key/index.html | 2 +- .../docs/iroh_net/key/struct.PublicKey.html | 30 +++--- .../docs/iroh_net/key/struct.SecretKey.html | 26 ++--- .../iroh_net/key/struct.SharedSecret.html | 8 +- pr/2656/docs/iroh_net/key/type.NodeId.html | 2 +- .../metrics/struct.MagicsockMetrics.html | 98 +++++++++---------- .../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/2656/docs/iroh_net/struct.AddrInfo.html | 18 ++-- pr/2656/docs/iroh_net/struct.NodeAddr.html | 32 +++--- .../iroh_net/ticket/struct.NodeTicket.html | 18 ++-- pr/2656/docs/iroh_net/type.NodeId.html | 2 +- .../iroh_net_bench/enum.EndpointSelector.html | 4 +- .../docs/iroh_net_bench/iroh/fn.client.html | 4 +- .../iroh/fn.connect_client.html | 6 +- .../docs/iroh_net_bench/iroh/fn.server.html | 2 +- .../iroh/fn.server_endpoint.html | 4 +- .../metrics/struct.StunMetrics.html | 24 ++--- pr/2656/docs/iroh_relay/struct.Config.html | 4 +- pr/2656/docs/settings.html | 2 +- .../trait.impl/core/convert/trait.From.js | 2 +- .../iroh_base/ticket/trait.Ticket.js | 2 +- .../iroh_metrics/core/trait.Metric.js | 12 +-- .../iroh/gossip/proto/enum.Command.js | 2 +- .../type.impl/iroh/gossip/proto/enum.Event.js | 2 +- .../iroh/net/key/struct.PublicKey.js | 2 +- .../iroh_net/key/struct.PublicKey.js | 2 +- pr/2656/docs/type.impl/std/primitive.array.js | 4 +- 387 files changed, 2075 insertions(+), 2075 deletions(-) diff --git a/pr/2656/docs/help.html b/pr/2656/docs/help.html index ae70b6bfbd..49d451041f 100644 --- a/pr/2656/docs/help.html +++ b/pr/2656/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/2656/docs/iroh/base/base32/enum.HexOrBase32ParseError.html b/pr/2656/docs/iroh/base/base32/enum.HexOrBase32ParseError.html index d8f77ff95c..00dcf4b29d 100644 --- a/pr/2656/docs/iroh/base/base32/enum.HexOrBase32ParseError.html +++ b/pr/2656/docs/iroh/base/base32/enum.HexOrBase32ParseError.html @@ -1,10 +1,10 @@ -HexOrBase32ParseError in iroh::base::base32 - Rust

Enum iroh::base::base32::HexOrBase32ParseError

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

Enum iroh::base::base32::HexOrBase32ParseError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/base32/fn.fmt.html b/pr/2656/docs/iroh/base/base32/fn.fmt.html index 4a36fbfbe3..1e14bebd41 100644 --- a/pr/2656/docs/iroh/base/base32/fn.fmt.html +++ b/pr/2656/docs/iroh/base/base32/fn.fmt.html @@ -1,2 +1,2 @@ -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

+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

\ No newline at end of file diff --git a/pr/2656/docs/iroh/base/base32/fn.fmt_append.html b/pr/2656/docs/iroh/base/base32/fn.fmt_append.html index 57a071daaf..846cecb4b8 100644 --- a/pr/2656/docs/iroh/base/base32/fn.fmt_append.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/base/base32/fn.fmt_short.html b/pr/2656/docs/iroh/base/base32/fn.fmt_short.html index 86bc434deb..ee63f30f57 100644 --- a/pr/2656/docs/iroh/base/base32/fn.fmt_short.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/base/base32/fn.parse_array.html b/pr/2656/docs/iroh/base/base32/fn.parse_array.html index ab3a544786..49e792d95b 100644 --- a/pr/2656/docs/iroh/base/base32/fn.parse_array.html +++ b/pr/2656/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

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

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

\ No newline at end of file diff --git a/pr/2656/docs/iroh/base/base32/fn.parse_array_hex_or_base32.html b/pr/2656/docs/iroh/base/base32/fn.parse_array_hex_or_base32.html index 55ae50e067..2d22c17b01 100644 --- a/pr/2656/docs/iroh/base/base32/fn.parse_array_hex_or_base32.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/base/base32/fn.parse_vec.html b/pr/2656/docs/iroh/base/base32/fn.parse_vec.html index b0cf310b98..39214d0edc 100644 --- a/pr/2656/docs/iroh/base/base32/fn.parse_vec.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/base/base32/index.html b/pr/2656/docs/iroh/base/base32/index.html index ddd203224b..94297e863d 100644 --- a/pr/2656/docs/iroh/base/base32/index.html +++ b/pr/2656/docs/iroh/base/base32/index.html @@ -1 +1 @@ -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 +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 diff --git a/pr/2656/docs/iroh/base/base32/struct.DecodeError.html b/pr/2656/docs/iroh/base/base32/struct.DecodeError.html index bbb6d023e1..1cf43ccb05 100644 --- a/pr/2656/docs/iroh/base/base32/struct.DecodeError.html +++ b/pr/2656/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
§

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 +

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 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/2656/docs/iroh/base/hash/enum.BlobFormat.html b/pr/2656/docs/iroh/base/hash/enum.BlobFormat.html index e3890deb56..95cca4fa85 100644 --- a/pr/2656/docs/iroh/base/hash/enum.BlobFormat.html +++ b/pr/2656/docs/iroh/base/hash/enum.BlobFormat.html @@ -1,30 +1,30 @@ -BlobFormat in iroh::base::hash - Rust

Enum iroh::base::hash::BlobFormat

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

Enum iroh::base::hash::BlobFormat

source ·
pub enum BlobFormat {
     Raw,
     HashSeq,
 }
Expand description

A format identifier

Variants§

§

Raw

Raw blob

§

HashSeq

A sequence of BLAKE3 hashes

-

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>( +

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

source§

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
§

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 + __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 __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 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,

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,

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
§

impl PartialEq for BlobFormat

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for BlobFormat

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for BlobFormat

source§

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
§

impl Copy for BlobFormat

§

impl Eq for BlobFormat

§

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
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -142,7 +142,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>,

§

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

source§

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/2656/docs/iroh/base/hash/index.html b/pr/2656/docs/iroh/base/hash/index.html index 0ae43ab651..15743c7560 100644 --- a/pr/2656/docs/iroh/base/hash/index.html +++ b/pr/2656/docs/iroh/base/hash/index.html @@ -1,2 +1,2 @@ -iroh::base::hash - Rust

Module iroh::base::hash

Expand description

The blake3 hash used in Iroh.

+iroh::base::hash - Rust

Module iroh::base::hash

source ·
Expand description

The blake3 hash used in Iroh.

Structs§

Enums§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/base/hash/struct.Hash.html b/pr/2656/docs/iroh/base/hash/struct.Hash.html index d12267e879..3db7439e48 100644 --- a/pr/2656/docs/iroh/base/hash/struct.Hash.html +++ b/pr/2656/docs/iroh/base/hash/struct.Hash.html @@ -1,37 +1,37 @@ -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 +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 representation of the 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>( +

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

source§

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
§

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 + 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 __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 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,

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,

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
§

impl PartialEq for Hash

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for Hash

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for Hash

source§

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
§

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 + 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 Hash: 'a,

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

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

source§

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
§

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 + 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 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 @@ -159,7 +159,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>,

§

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

source§

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/2656/docs/iroh/base/hash/struct.HashAndFormat.html b/pr/2656/docs/iroh/base/hash/struct.HashAndFormat.html index cacd79e586..f6f01c4f12 100644 --- a/pr/2656/docs/iroh/base/hash/struct.HashAndFormat.html +++ b/pr/2656/docs/iroh/base/hash/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh::base::hash - Rust

Struct iroh::base::hash::HashAndFormat

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

Struct iroh::base::hash::HashAndFormat

source ·
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§

§

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>( +

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

source§

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
§

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 + 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 __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 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,

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,

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
§

impl PartialEq for HashAndFormat

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for HashAndFormat

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for HashAndFormat

source§

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
§

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 + 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 HashAndFormat: 'a,

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

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

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -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>,

§

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

source§

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/2656/docs/iroh/base/index.html b/pr/2656/docs/iroh/base/index.html index 4ac5b20ced..e85fb01b7c 100644 --- a/pr/2656/docs/iroh/base/index.html +++ b/pr/2656/docs/iroh/base/index.html @@ -1,2 +1,2 @@ -iroh::base - Rust

Crate iroh::base

Expand description

Base types and utilities for Iroh

+iroh::base - Rust

Crate iroh::base

source ·
Expand description

Base types and utilities for Iroh

Modules§

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

Enum iroh::base::key::KeyParsingError

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

Enum iroh::base::key::KeyParsingError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/key/index.html b/pr/2656/docs/iroh/base/key/index.html index fbabb3bf42..7731f28b6c 100644 --- a/pr/2656/docs/iroh/base/key/index.html +++ b/pr/2656/docs/iroh/base/key/index.html @@ -1,2 +1,2 @@ -iroh::base::key - Rust

Module iroh::base::key

Expand description

Cryptographic key handling for iroh-net.

+iroh::base::key - Rust

Module iroh::base::key

source ·
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/2656/docs/iroh/base/key/struct.PublicKey.html b/pr/2656/docs/iroh/base/key/struct.PublicKey.html index d8386e63f6..f0ed40ed6e 100644 --- a/pr/2656/docs/iroh/base/key/struct.PublicKey.html +++ b/pr/2656/docs/iroh/base/key/struct.PublicKey.html @@ -1,45 +1,45 @@ -PublicKey in iroh::base::key - Rust

Struct iroh::base::key::PublicKey

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

A public key.

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

Struct iroh::base::key::PublicKey

source ·
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§

§

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.

+

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.

§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.

-

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

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

+
source

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.

-

pub fn fmt_short(&self) -> String

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

source

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§

§

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>( +

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

source§

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
§

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.

+ 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.

Display is capable of serialising this format.

-
§

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 +
§

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 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 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,

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,

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
§

impl PartialEq for PublicKey

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for PublicKey

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for PublicKey

source§

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
§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

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

fn try_from( + 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( bytes: &[u8] -) -> 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( +) -> 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( bytes: &[u8; 32] -) -> 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 +) -> 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 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 @@ -167,7 +167,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>,

§

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

source§

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/2656/docs/iroh/base/key/struct.SecretKey.html b/pr/2656/docs/iroh/base/key/struct.SecretKey.html index 4be69a5f54..ea3b0260c6 100644 --- a/pr/2656/docs/iroh/base/key/struct.SecretKey.html +++ b/pr/2656/docs/iroh/base/key/struct.SecretKey.html @@ -1,24 +1,24 @@ -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 +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 R: CryptoRngCore + ?Sized,

Generate a new SecretKey with a randomness generator.

-

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 +

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 T: AsRef<[u8]>,

Deserialise this key from OpenSSH format.

-

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. +

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. The public part can always be recovered.

-

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>( +

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

source§

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
§

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>( + 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

source§

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
§

impl TryFrom<&[u8]> for SecretKey

§

type Error = Error

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

fn try_from( + 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( 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/2656/docs/iroh/base/key/struct.SharedSecret.html b/pr/2656/docs/iroh/base/key/struct.SharedSecret.html index 021fa45935..b15d270ee9 100644 --- a/pr/2656/docs/iroh/base/key/struct.SharedSecret.html +++ b/pr/2656/docs/iroh/base/key/struct.SharedSecret.html @@ -1,7 +1,7 @@ -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 +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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/key/type.NodeId.html b/pr/2656/docs/iroh/base/key/type.NodeId.html index 5563344949..5c06d59eee 100644 --- a/pr/2656/docs/iroh/base/key/type.NodeId.html +++ b/pr/2656/docs/iroh/base/key/type.NodeId.html @@ -1,4 +1,4 @@ -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.

+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.

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/2656/docs/iroh/base/node_addr/enum.AddrInfoOptions.html b/pr/2656/docs/iroh/base/node_addr/enum.AddrInfoOptions.html index 8a5c342ab2..6a46841ae4 100644 --- a/pr/2656/docs/iroh/base/node_addr/enum.AddrInfoOptions.html +++ b/pr/2656/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

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

Enum iroh::base::node_addr::AddrInfoOptions

source ·
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§

§

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>( +

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

source§

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
§

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( + __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( src: &str -) -> 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 +) -> 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 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 Serialize for AddrInfoOptions

§

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

source§

impl Serialize for AddrInfoOptions

source§

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
§

impl Copy for AddrInfoOptions

§

impl Eq for AddrInfoOptions

§

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
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/node_addr/index.html b/pr/2656/docs/iroh/base/node_addr/index.html index 0abf72daff..4683d970d3 100644 --- a/pr/2656/docs/iroh/base/node_addr/index.html +++ b/pr/2656/docs/iroh/base/node_addr/index.html @@ -1,4 +1,4 @@ -iroh::base::node_addr - Rust

Module iroh::base::node_addr

Expand description

Addressing for iroh nodes.

+iroh::base::node_addr - Rust

Module iroh::base::node_addr

source ·
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/2656/docs/iroh/base/node_addr/struct.AddrInfo.html b/pr/2656/docs/iroh/base/node_addr/struct.AddrInfo.html index 97f3679e32..f2b3b596f9 100644 --- a/pr/2656/docs/iroh/base/node_addr/struct.AddrInfo.html +++ b/pr/2656/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

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

Struct iroh::base::node_addr::AddrInfo

source ·
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§

§

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.

+

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.

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§

§

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>( +

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

source§

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.
§

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 + __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 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
§

impl PartialEq for AddrInfo

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for AddrInfo

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for AddrInfo

source§

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
§

impl Eq for AddrInfo

§

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
source§

impl Eq for AddrInfo

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/node_addr/struct.NodeAddr.html b/pr/2656/docs/iroh/base/node_addr/struct.NodeAddr.html index 1215fe026b..fbea9b2efe 100644 --- a/pr/2656/docs/iroh/base/node_addr/struct.NodeAddr.html +++ b/pr/2656/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

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

Struct iroh::base::node_addr::NodeAddr

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

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

@@ -25,40 +25,40 @@ 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§

§

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( +

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( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

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

-

pub fn from_parts( +

source

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

Creates a new NodeAddr from its parts.

-

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

Applies the options to self.

+
source

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.

-

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>( +

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

source§

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
§

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

§

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

Converts to this type from the input type.
§

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

-
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
§

impl From<NodeTicket> for NodeAddr

§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<RemoteInfo> for NodeAddr

source§

fn from(info: RemoteInfo) -> 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 + __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<NodeAddr> for NodeTicket

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

+
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeTicket> for NodeAddr

source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

+
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<RemoteInfo> for NodeAddr

source§

fn from(info: RemoteInfo) -> 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 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
§

impl PartialEq for NodeAddr

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for NodeAddr

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for NodeAddr

source§

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
§

impl Eq for NodeAddr

§

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
source§

impl Eq for NodeAddr

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/node_addr/struct.RelayUrl.html b/pr/2656/docs/iroh/base/node_addr/struct.RelayUrl.html index 60100cb58a..2228de968d 100644 --- a/pr/2656/docs/iroh/base/node_addr/struct.RelayUrl.html +++ b/pr/2656/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

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

source ·
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§

§

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.

+

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.

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.
§

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

Dereferences the value.
§

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

§

fn deserialize<__D>( +

§

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

source§

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
§

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.

+ __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.

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.
§

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 +
§

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 __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 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,

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,

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
§

impl PartialEq for RelayUrl

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for RelayUrl

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for RelayUrl

source§

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
§

impl Eq for RelayUrl

§

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
source§

impl Eq for RelayUrl

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/rpc/index.html b/pr/2656/docs/iroh/base/rpc/index.html index 0e19299f26..7fdd9d3d93 100644 --- a/pr/2656/docs/iroh/base/rpc/index.html +++ b/pr/2656/docs/iroh/base/rpc/index.html @@ -1 +1 @@ -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 +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 diff --git a/pr/2656/docs/iroh/base/rpc/struct.RpcError.html b/pr/2656/docs/iroh/base/rpc/struct.RpcError.html index 7a6f3b9a63..8a40551ccf 100644 --- a/pr/2656/docs/iroh/base/rpc/struct.RpcError.html +++ b/pr/2656/docs/iroh/base/rpc/struct.RpcError.html @@ -1,8 +1,8 @@ -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>( +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>( __deserializer: __D ) -> Result<RpcError, <__D as Deserializer<'de>>::Error>
where - __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>( + __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>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/base/rpc/type.RpcResult.html b/pr/2656/docs/iroh/base/rpc/type.RpcResult.html index db8b916de2..5ac8a471e6 100644 --- a/pr/2656/docs/iroh/base/rpc/type.RpcResult.html +++ b/pr/2656/docs/iroh/base/rpc/type.RpcResult.html @@ -1,4 +1,4 @@ -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.

+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.

Aliased Type§

enum RpcResult<T> {
     Ok(T),
     Err(RpcError),
diff --git a/pr/2656/docs/iroh/base/ticket/enum.Error.html b/pr/2656/docs/iroh/base/ticket/enum.Error.html
index f6df309769..6ddf871d2f 100644
--- a/pr/2656/docs/iroh/base/ticket/enum.Error.html
+++ b/pr/2656/docs/iroh/base/ticket/enum.Error.html
@@ -1,4 +1,4 @@
-Error in iroh::base::ticket - Rust

Enum iroh::base::ticket::Error

pub enum Error {
+Error in iroh::base::ticket - Rust

Enum iroh::base::ticket::Error

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/ticket/index.html b/pr/2656/docs/iroh/base/ticket/index.html index 8c4b7e2e76..24f2c8b585 100644 --- a/pr/2656/docs/iroh/base/ticket/index.html +++ b/pr/2656/docs/iroh/base/ticket/index.html @@ -1,3 +1,3 @@ -iroh::base::ticket - Rust

Module iroh::base::ticket

Structs§

  • A token containing everything to get a file from the provider.
  • A token containing information for establishing a connection to a node.

Enums§

  • An error deserializing an iroh ticket.

Traits§

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

impl Display for BlobTicket

source§

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

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

impl FromStr for BlobTicket

§

type Err = Error

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

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

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

impl PartialEq for BlobTicket

source§

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.
§

impl Serialize for BlobTicket

§

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

source§

impl Serialize for BlobTicket

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/ticket/struct.NodeTicket.html b/pr/2656/docs/iroh/base/ticket/struct.NodeTicket.html index b1a4a51d31..1817ae0edd 100644 --- a/pr/2656/docs/iroh/base/ticket/struct.NodeTicket.html +++ b/pr/2656/docs/iroh/base/ticket/struct.NodeTicket.html @@ -1,4 +1,4 @@ -NodeTicket in iroh::base::ticket - Rust

Struct iroh::base::ticket::NodeTicket

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

A token containing information for establishing a connection to a node.

+NodeTicket in iroh::base::ticket - Rust

Struct iroh::base::ticket::NodeTicket

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

A token containing information for establishing a connection to a node.

Contains

  • The NodeId of the node to connect to (a 32-byte ed25519 public key).
  • @@ -8,20 +8,20 @@

    This allows establishing a connection to the node in most circumstances where it is possible to do so.

    This NodeTicket is a single item which can be easily serialized and deserialized.

    -

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>( +

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

source§

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
§

impl Display for NodeTicket

§

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

Formats the value using the given formatter. Read more
§

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

-
§

impl From<NodeTicket> for NodeAddr

§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
§

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 + 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 From<NodeAddr> for NodeTicket

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

+
source§

impl From<NodeTicket> for NodeAddr

source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

+
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 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 Serialize for NodeTicket

§

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

source§

impl Serialize for NodeTicket

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/base/ticket/trait.Ticket.html b/pr/2656/docs/iroh/base/ticket/trait.Ticket.html index 5a2cf62192..5ea1c3b781 100644 --- a/pr/2656/docs/iroh/base/ticket/trait.Ticket.html +++ b/pr/2656/docs/iroh/base/ticket/trait.Ticket.html @@ -1,4 +1,4 @@ -Ticket in iroh::base::ticket - Rust

Trait iroh::base::ticket::Ticket

pub trait Ticket: Sized {
+Ticket in iroh::base::ticket - Rust

Trait iroh::base::ticket::Ticket

source ·
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§

const KIND: &'static str

String prefix describing the kind of iroh ticket.

+

Required Associated Constants§

source

const KIND: &'static str

String prefix describing the kind of iroh ticket.

This should be lower case ascii characters.

-

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 +

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 diff --git a/pr/2656/docs/iroh/blobs/constant.IROH_BLOCK_SIZE.html b/pr/2656/docs/iroh/blobs/constant.IROH_BLOCK_SIZE.html index b4e60ef455..3dc0fcd463 100644 --- a/pr/2656/docs/iroh/blobs/constant.IROH_BLOCK_SIZE.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/blobs/downloader/enum.DownloadError.html b/pr/2656/docs/iroh/blobs/downloader/enum.DownloadError.html index 0c25c4abc5..67d9861b18 100644 --- a/pr/2656/docs/iroh/blobs/downloader/enum.DownloadError.html +++ b/pr/2656/docs/iroh/blobs/downloader/enum.DownloadError.html @@ -1,4 +1,4 @@ -DownloadError in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::DownloadError

pub enum DownloadError {
+DownloadError in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::DownloadError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/downloader/enum.FailureAction.html b/pr/2656/docs/iroh/blobs/downloader/enum.FailureAction.html index 98ffe17d97..a90b4d5d76 100644 --- a/pr/2656/docs/iroh/blobs/downloader/enum.FailureAction.html +++ b/pr/2656/docs/iroh/blobs/downloader/enum.FailureAction.html @@ -1,4 +1,4 @@ -FailureAction in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::FailureAction

pub enum FailureAction {
+FailureAction in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::FailureAction

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/downloader/enum.GetOutput.html b/pr/2656/docs/iroh/blobs/downloader/enum.GetOutput.html index 5493469472..632aab9a42 100644 --- a/pr/2656/docs/iroh/blobs/downloader/enum.GetOutput.html +++ b/pr/2656/docs/iroh/blobs/downloader/enum.GetOutput.html @@ -1,11 +1,11 @@ -GetOutput in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::GetOutput

pub enum GetOutput<N> {
+GetOutput in iroh::blobs::downloader - Rust

Enum iroh::blobs::downloader::GetOutput

source ·
pub enum GetOutput<N> {
     Complete(Stats),
     NeedsConn(N),
 }
Expand description

Output returned from Getter::get.

Variants§

§

Complete(Stats)

The request is already complete in the local store.

§

NeedsConn(N)

The request needs a connection to continue.

-

Trait Implementations§

§

impl<N> Debug for GetOutput<N>
where - N: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<N> Freeze for GetOutput<N>
where +

Trait Implementations§

source§

impl<N> Debug for GetOutput<N>
where + N: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<N> Freeze for GetOutput<N>
where N: Freeze,

§

impl<N> RefUnwindSafe for GetOutput<N>
where N: RefUnwindSafe,

§

impl<N> Send for GetOutput<N>
where N: Send,

§

impl<N> Sync for GetOutput<N>
where diff --git a/pr/2656/docs/iroh/blobs/downloader/index.html b/pr/2656/docs/iroh/blobs/downloader/index.html index 28232b1ee6..d1e01ac8d8 100644 --- a/pr/2656/docs/iroh/blobs/downloader/index.html +++ b/pr/2656/docs/iroh/blobs/downloader/index.html @@ -1,4 +1,4 @@ -iroh::blobs::downloader - Rust

Module iroh::blobs::downloader

Expand description

Handle downloading blobs and collections concurrently and from nodes.

+iroh::blobs::downloader - Rust

Module iroh::blobs::downloader

source ·
Expand description

Handle downloading blobs and collections concurrently and from nodes.

The Downloader interacts with four main components to this end.

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>,

§

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

source§

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/2656/docs/iroh/blobs/export/enum.ExportProgress.html b/pr/2656/docs/iroh/blobs/export/enum.ExportProgress.html index 0b25831902..ea8ffd8c38 100644 --- a/pr/2656/docs/iroh/blobs/export/enum.ExportProgress.html +++ b/pr/2656/docs/iroh/blobs/export/enum.ExportProgress.html @@ -1,4 +1,4 @@ -ExportProgress in iroh::blobs::export - Rust

Enum iroh::blobs::export::ExportProgress

pub enum ExportProgress {
+ExportProgress in iroh::blobs::export - Rust

Enum iroh::blobs::export::ExportProgress

source ·
pub enum ExportProgress {
     Found {
         id: u64,
         hash: Hash,
@@ -31,10 +31,10 @@
 

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.

-

Trait Implementations§

§

impl Clone for ExportProgress

§

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
§

impl Debug for ExportProgress

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ExportProgress

§

fn deserialize<__D>( +

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<(), Error>

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

impl<'de> Deserialize<'de> for ExportProgress

source§

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

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

impl Serialize for ExportProgress

§

fn serialize<__S>( + __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 as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/blobs/export/fn.export.html b/pr/2656/docs/iroh/blobs/export/fn.export.html index 89f6a7b13b..a71f635e73 100644 --- a/pr/2656/docs/iroh/blobs/export/fn.export.html +++ b/pr/2656/docs/iroh/blobs/export/fn.export.html @@ -1,4 +1,4 @@ -export in iroh::blobs::export - Rust

Function iroh::blobs::export::export

pub async fn export<D>(
+export in iroh::blobs::export - Rust

Function iroh::blobs::export::export

source ·
pub async fn export<D>(
     db: &D,
     hash: Hash,
     outpath: PathBuf,
diff --git a/pr/2656/docs/iroh/blobs/export/fn.export_blob.html b/pr/2656/docs/iroh/blobs/export/fn.export_blob.html
index 8e8779d635..393bb8073f 100644
--- a/pr/2656/docs/iroh/blobs/export/fn.export_blob.html
+++ b/pr/2656/docs/iroh/blobs/export/fn.export_blob.html
@@ -1,4 +1,4 @@
-export_blob in iroh::blobs::export - Rust

Function iroh::blobs::export::export_blob

pub async fn export_blob<D>(
+export_blob in iroh::blobs::export - Rust

Function iroh::blobs::export::export_blob

source ·
pub async fn export_blob<D>(
     db: &D,
     hash: Hash,
     outpath: PathBuf,
diff --git a/pr/2656/docs/iroh/blobs/export/fn.export_collection.html b/pr/2656/docs/iroh/blobs/export/fn.export_collection.html
index 469835701e..92ea0010a5 100644
--- a/pr/2656/docs/iroh/blobs/export/fn.export_collection.html
+++ b/pr/2656/docs/iroh/blobs/export/fn.export_collection.html
@@ -1,4 +1,4 @@
-export_collection in iroh::blobs::export - Rust

Function iroh::blobs::export::export_collection

pub async fn export_collection<D>(
+export_collection in iroh::blobs::export - Rust

Function iroh::blobs::export::export_collection

source ·
pub async fn export_collection<D>(
     db: &D,
     hash: Hash,
     outpath: PathBuf,
diff --git a/pr/2656/docs/iroh/blobs/export/index.html b/pr/2656/docs/iroh/blobs/export/index.html
index 2c795d8a46..26a38d519a 100644
--- a/pr/2656/docs/iroh/blobs/export/index.html
+++ b/pr/2656/docs/iroh/blobs/export/index.html
@@ -1,2 +1,2 @@
-iroh::blobs::export - Rust

Module iroh::blobs::export

Expand description

Functions to export data from a store

+iroh::blobs::export - Rust

Module iroh::blobs::export

source ·
Expand description

Functions to export data from a store

Enums§

Functions§

  • Export a hash to the local file system.
  • Export a single blob to a file on the local filesystem.
  • Export all entries of a collection, recursively, to files on the local filesystem.
\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/format/collection/index.html b/pr/2656/docs/iroh/blobs/format/collection/index.html index ccdce52087..7aaeb539a3 100644 --- a/pr/2656/docs/iroh/blobs/format/collection/index.html +++ b/pr/2656/docs/iroh/blobs/format/collection/index.html @@ -1,2 +1,2 @@ -iroh::blobs::format::collection - Rust

Module iroh::blobs::format::collection

Expand description

The collection type used by iroh

+iroh::blobs::format::collection - Rust

Module iroh::blobs::format::collection

source ·
Expand description

The collection type used by iroh

Structs§

Traits§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/format/collection/struct.Collection.html b/pr/2656/docs/iroh/blobs/format/collection/struct.Collection.html index 7f7fc810a0..3b33af625c 100644 --- a/pr/2656/docs/iroh/blobs/format/collection/struct.Collection.html +++ b/pr/2656/docs/iroh/blobs/format/collection/struct.Collection.html @@ -1,51 +1,51 @@ -Collection in iroh::blobs::format::collection - Rust

Struct iroh::blobs::format::collection::Collection

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

A collection of blobs

+Collection in iroh::blobs::format::collection - Rust

Struct iroh::blobs::format::collection::Collection

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

A collection of blobs

Note that the format is subject to change.

-

Implementations§

§

impl Collection

pub const HEADER: &'static [u8; 13] = b"CollectionV0."

The header for the collection format.

+

Implementations§

source§

impl Collection

source

pub const HEADER: &'static [u8; 13] = b"CollectionV0."

The header for the collection format.

This is the start of the metadata blob.

-

pub fn to_blobs(&self) -> impl DoubleEndedIterator

Convert the collection to an iterator of blobs, with the last being the +

source

pub fn to_blobs(&self) -> impl DoubleEndedIterator

Convert the collection to an iterator of blobs, with the last being the root blob.

To persist the collection, write all the blobs to storage, and use the hash of the last blob as the collection hash.

-

pub async fn read_fsm( +

source

pub async fn read_fsm( fsm_at_start_root: AtStartRoot ) -> Result<(EndBlobNext, HashSeq, Collection), Error>

Read the collection from a get fsm.

Returns the fsm at the start of the first child blob (if any), the links array, and the collection.

-

pub async fn read_fsm_all( +

source

pub async fn read_fsm_all( fsm_at_start_root: AtStartRoot ) -> Result<(Collection, BTreeMap<u64, Bytes>, Stats), Error>

Read the collection and all it’s children from a get fsm.

Returns the collection, a map from blob offsets to bytes, and the stats.

-

pub async fn load( +

source

pub async fn load( root: Hash, store: &impl SimpleStore ) -> Result<Collection, Error>

Create a new collection from a hash sequence and metadata.

-

pub async fn load_db<D>(db: &D, root: &Hash) -> Result<Collection, Error>
where +

source

pub async fn load_db<D>(db: &D, root: &Hash) -> Result<Collection, Error>
where D: Map,

Load a collection from a store given a root hash

This assumes that both the links and the metadata of the collection is stored in the store. It does not require that all child blobs are stored in the store.

-

pub async fn store<D>(self, db: &D) -> Result<TempTag, Error>
where +

source

pub async fn store<D>(self, db: &D) -> Result<TempTag, Error>
where D: Store,

Store a collection in a store. returns the root hash of the collection as a TempTag.

-

pub fn iter(&self) -> impl Iterator<Item = &(String, Hash)>

Iterate over the blobs in this collection

-

pub fn len(&self) -> usize

Get the number of blobs in this collection

-

pub fn is_empty(&self) -> bool

Check if this collection is empty

-

pub fn push(&mut self, name: String, hash: Hash)

Add the given blob to the collection.

-

Trait Implementations§

§

impl Clone for Collection

§

fn clone(&self) -> Collection

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 Collection

§

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

Formats the value using the given formatter. Read more
§

impl Default for Collection

§

fn default() -> Collection

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

impl<'de> Deserialize<'de> for Collection

§

fn deserialize<__D>( +

source

pub fn iter(&self) -> impl Iterator<Item = &(String, Hash)>

Iterate over the blobs in this collection

+
source

pub fn len(&self) -> usize

Get the number of blobs in this collection

+
source

pub fn is_empty(&self) -> bool

Check if this collection is empty

+
source

pub fn push(&mut self, name: String, hash: Hash)

Add the given blob to the collection.

+

Trait Implementations§

source§

impl Clone for Collection

source§

fn clone(&self) -> Collection

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 Collection

source§

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

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

impl Default for Collection

source§

fn default() -> Collection

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

impl<'de> Deserialize<'de> for Collection

source§

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

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

impl<K, V> Extend<(K, V)> for Collection
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

source§

impl<K, V> Extend<(K, V)> for Collection
where K: Into<String>, - V: Into<Hash>,

§

fn extend<T>(&mut self, iter: T)
where - T: IntoIterator<Item = (K, V)>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
§

impl<K, V> FromIterator<(K, V)> for Collection
where + V: Into<Hash>,

source§

fn extend<T>(&mut self, iter: T)
where + T: IntoIterator<Item = (K, V)>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<K, V> FromIterator<(K, V)> for Collection
where K: Into<String>, - V: Into<Hash>,

§

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 + V: Into<Hash>,
source§

fn from_iter<T>(iter: T) -> Collection
where + T: IntoIterator<Item = (K, V)>,

Creates a value from an iterator. Read more
source§

impl Index<usize> for Collection

§

type Output = (String, Hash)

The returned type after indexing.
source§

fn index(&self, index: usize) -> &<Collection as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
source§

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?
source§

fn into_iter(self) -> <Collection as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq for Collection

source§

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.
§

impl Serialize for Collection

§

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

source§

impl Serialize for Collection

source§

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
§

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
source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/format/collection/trait.SimpleStore.html b/pr/2656/docs/iroh/blobs/format/collection/trait.SimpleStore.html index 58cfc39951..30fc0402f1 100644 --- a/pr/2656/docs/iroh/blobs/format/collection/trait.SimpleStore.html +++ b/pr/2656/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

pub trait SimpleStore {
+SimpleStore in iroh::blobs::format::collection - Rust

Trait iroh::blobs::format::collection::SimpleStore

source ·
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§

fn load(&self, hash: Hash) -> impl Future<Output = Result<Bytes, Error>> + Send

Load a blob from the store

+

Required Methods§

source

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/2656/docs/iroh/blobs/format/index.html b/pr/2656/docs/iroh/blobs/format/index.html index 077debeba1..52b4571117 100644 --- a/pr/2656/docs/iroh/blobs/format/index.html +++ b/pr/2656/docs/iroh/blobs/format/index.html @@ -1,4 +1,4 @@ -iroh::blobs::format - Rust

Module iroh::blobs::format

Expand description

Defines data formats for HashSeq.

+iroh::blobs::format - Rust

Module iroh::blobs::format

source ·
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/2656/docs/iroh/blobs/get/db/enum.BlobId.html b/pr/2656/docs/iroh/blobs/get/db/enum.BlobId.html index c2d79aa134..08297223e4 100644 --- a/pr/2656/docs/iroh/blobs/get/db/enum.BlobId.html +++ b/pr/2656/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

pub enum BlobId {
+BlobId in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::BlobId

source ·
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§

§

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>( +

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

source§

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
§

impl Hash for BlobId

§

fn hash<__H>(&self, state: &mut __H)
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 __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 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,

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,

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
§

impl PartialEq for BlobId

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for BlobId

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for BlobId

source§

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
§

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 + __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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -138,7 +138,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>,

§

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

source§

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/2656/docs/iroh/blobs/get/db/enum.BlobInfo.html b/pr/2656/docs/iroh/blobs/get/db/enum.BlobInfo.html index 0269b61669..512d8253e0 100644 --- a/pr/2656/docs/iroh/blobs/get/db/enum.BlobInfo.html +++ b/pr/2656/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

pub enum BlobInfo<D>
where +BlobInfo in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::BlobInfo

source ·
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§

§

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.

+

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.

This will be all for complete blobs, empty for missing blobs, and a set with possibly open last range for partial blobs.

-

pub fn missing_ranges(&self) -> RangeSet<[ChunkNum; 2]>

Ranges that are missing locally and need to be requested.

+
source

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§

§

impl<D> Clone for BlobInfo<D>
where +

Trait Implementations§

source§

impl<D> Clone for BlobInfo<D>
where D: Clone + Store, - <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 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: Debug + Store, - <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: 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: 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/2656/docs/iroh/blobs/get/db/enum.DownloadProgress.html b/pr/2656/docs/iroh/blobs/get/db/enum.DownloadProgress.html index 1057bca18f..325eef042b 100644 --- a/pr/2656/docs/iroh/blobs/get/db/enum.DownloadProgress.html +++ b/pr/2656/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

pub enum DownloadProgress {
+DownloadProgress in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::DownloadProgress

source ·
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§

§

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>( +

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

source§

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
§

impl Serialize for DownloadProgress

§

fn serialize<__S>( + __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 as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/blobs/get/db/enum.GetState.html b/pr/2656/docs/iroh/blobs/get/db/enum.GetState.html index 634dcdaeb5..c63a199f35 100644 --- a/pr/2656/docs/iroh/blobs/get/db/enum.GetState.html +++ b/pr/2656/docs/iroh/blobs/get/db/enum.GetState.html @@ -1,4 +1,4 @@ -GetState in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::GetState

pub enum GetState {
+GetState in iroh::blobs::get::db - Rust

Enum iroh::blobs::get::db::GetState

source ·
pub enum GetState {
     Complete(Stats),
     NeedsConn(GetStateNeedsConn),
 }
Expand description

Output of get_to_db_in_steps.

@@ -7,7 +7,7 @@
§

NeedsConn(GetStateNeedsConn)

The requested data is not fully available in the local store, we need a connection to proceed.

Once a connection is available, call GetStateNeedsConn::proceed to continue.

-

Trait Implementations§

§

impl Debug for GetState

§

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§

source§

impl Debug for GetState

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/db/fn.blob_info.html b/pr/2656/docs/iroh/blobs/get/db/fn.blob_info.html index 365ecb8c17..ddf2df831d 100644 --- a/pr/2656/docs/iroh/blobs/get/db/fn.blob_info.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/blobs/get/db/fn.get_to_db.html b/pr/2656/docs/iroh/blobs/get/db/fn.get_to_db.html index dca3038c08..fa9fb4eeb9 100644 --- a/pr/2656/docs/iroh/blobs/get/db/fn.get_to_db.html +++ b/pr/2656/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

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

source ·
pub async fn get_to_db<D, C, F>(
     db: &D,
     get_conn: C,
     hash_and_format: &HashAndFormat,
diff --git a/pr/2656/docs/iroh/blobs/get/db/fn.get_to_db_in_steps.html b/pr/2656/docs/iroh/blobs/get/db/fn.get_to_db_in_steps.html
index 8164c7d6e8..3ee4ec88b4 100644
--- a/pr/2656/docs/iroh/blobs/get/db/fn.get_to_db_in_steps.html
+++ b/pr/2656/docs/iroh/blobs/get/db/fn.get_to_db_in_steps.html
@@ -1,4 +1,4 @@
-get_to_db_in_steps in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::get_to_db_in_steps

pub async fn get_to_db_in_steps<D, P>(
+get_to_db_in_steps in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::get_to_db_in_steps

source ·
pub async fn get_to_db_in_steps<D, P>(
     db: D,
     hash_and_format: HashAndFormat,
     progress_sender: P
diff --git a/pr/2656/docs/iroh/blobs/get/db/fn.valid_ranges.html b/pr/2656/docs/iroh/blobs/get/db/fn.valid_ranges.html
index 97fdd19c75..304a3c3fc0 100644
--- a/pr/2656/docs/iroh/blobs/get/db/fn.valid_ranges.html
+++ b/pr/2656/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

pub async fn valid_ranges<D>(
+valid_ranges in iroh::blobs::get::db - Rust

Function iroh::blobs::get::db::valid_ranges

source ·
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/2656/docs/iroh/blobs/get/db/index.html b/pr/2656/docs/iroh/blobs/get/db/index.html index ed06bd1d9f..a724b295d0 100644 --- a/pr/2656/docs/iroh/blobs/get/db/index.html +++ b/pr/2656/docs/iroh/blobs/get/db/index.html @@ -1,3 +1,3 @@ -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.

+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.

Structs§

Enums§

Functions§

  • Get information about a blob in a store.
  • Get a blob or collection into a store.
  • Get a blob or collection into a store, yielding if a connection is needed.
  • Given a partial entry, get the valid ranges.
\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/get/db/struct.GetStateNeedsConn.html b/pr/2656/docs/iroh/blobs/get/db/struct.GetStateNeedsConn.html index 2168dc76b7..d46f8965f0 100644 --- a/pr/2656/docs/iroh/blobs/get/db/struct.GetStateNeedsConn.html +++ b/pr/2656/docs/iroh/blobs/get/db/struct.GetStateNeedsConn.html @@ -1,7 +1,7 @@ -GetStateNeedsConn in iroh::blobs::get::db - Rust

Struct iroh::blobs::get::db::GetStateNeedsConn

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

Intermediary state returned from get_to_db_in_steps for a download request that needs a +GetStateNeedsConn in iroh::blobs::get::db - Rust

Struct iroh::blobs::get::db::GetStateNeedsConn

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

Intermediary state returned from get_to_db_in_steps for a download request that needs a connection to proceed.

-

Implementations§

§

impl GetStateNeedsConn

pub async fn proceed(self, conn: Connection) -> Result<Stats, GetError>

Proceed with the download by providing a connection to a provider.

-

Trait Implementations§

§

impl Debug for GetStateNeedsConn

§

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

Formats the value using the given formatter. Read more
§

impl NeedsConn<Connection> for GetStateNeedsConn

§

fn proceed( +

Implementations§

source§

impl GetStateNeedsConn

source

pub async fn proceed(self, conn: Connection) -> Result<Stats, GetError>

Proceed with the download by providing a connection to a provider.

+

Trait Implementations§

source§

impl Debug for GetStateNeedsConn

source§

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

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

impl NeedsConn<Connection> for GetStateNeedsConn

source§

fn proceed( self, conn: Connection ) -> Pin<Box<dyn Future<Output = Result<Stats, FailureAction>>>>

Proceeds the download with the given connection.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2656/docs/iroh/blobs/get/enum.GetResponseError.html b/pr/2656/docs/iroh/blobs/get/enum.GetResponseError.html index 0737cfdea8..551a5d8f2b 100644 --- a/pr/2656/docs/iroh/blobs/get/enum.GetResponseError.html +++ b/pr/2656/docs/iroh/blobs/get/enum.GetResponseError.html @@ -1,4 +1,4 @@ -GetResponseError in iroh::blobs::get - Rust

Enum iroh::blobs::get::GetResponseError

pub enum GetResponseError {
+GetResponseError in iroh::blobs::get - Rust

Enum iroh::blobs::get::GetResponseError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/error/enum.GetError.html b/pr/2656/docs/iroh/blobs/get/error/enum.GetError.html index 2853547c80..afe5a0ecb4 100644 --- a/pr/2656/docs/iroh/blobs/get/error/enum.GetError.html +++ b/pr/2656/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

pub enum GetError {
+GetError in iroh::blobs::get::error - Rust

Enum iroh::blobs::get::error::GetError

source ·
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§

§

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<ClosedStream> for GetError

§

fn from(value: ClosedStream) -> 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 +

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<ClosedStream> for GetError

source§

fn from(value: ClosedStream) -> 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/error/index.html b/pr/2656/docs/iroh/blobs/get/error/index.html index 4687cde0b8..5c483473b3 100644 --- a/pr/2656/docs/iroh/blobs/get/error/index.html +++ b/pr/2656/docs/iroh/blobs/get/error/index.html @@ -1,2 +1,2 @@ -iroh::blobs::get::error - Rust

Module iroh::blobs::get::error

Expand description

Error returned from get operations

+iroh::blobs::get::error - Rust

Module iroh::blobs::get::error

source ·
Expand description

Error returned from get operations

Enums§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/get/fsm/enum.AtBlobHeaderNextError.html b/pr/2656/docs/iroh/blobs/get/fsm/enum.AtBlobHeaderNextError.html index e59660b597..1fd9973478 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/enum.AtBlobHeaderNextError.html +++ b/pr/2656/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

pub enum AtBlobHeaderNextError {
+AtBlobHeaderNextError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::AtBlobHeaderNextError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/enum.BlobContentNext.html b/pr/2656/docs/iroh/blobs/get/fsm/enum.BlobContentNext.html index f2ec3f035a..884276fe9b 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/enum.BlobContentNext.html +++ b/pr/2656/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

pub enum BlobContentNext {
+BlobContentNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::BlobContentNext

source ·
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§

§

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( +

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

source§

fn from( value: (AtBlobContent, Result<BaoContentItem, DecodeError>) -) -> 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 +) -> 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/enum.ConnectedNext.html b/pr/2656/docs/iroh/blobs/get/fsm/enum.ConnectedNext.html index b08fe19474..1ccaaf8ddf 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/enum.ConnectedNext.html +++ b/pr/2656/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

pub enum ConnectedNext {
+ConnectedNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::ConnectedNext

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/enum.ConnectedNextError.html b/pr/2656/docs/iroh/blobs/get/fsm/enum.ConnectedNextError.html index d79138c374..fa816f825c 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/enum.ConnectedNextError.html +++ b/pr/2656/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

pub enum ConnectedNextError {
+ConnectedNextError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::ConnectedNextError

source ·
pub enum ConnectedNextError {
     PostcardSer(Error),
     RequestTooBig,
     Write(WriteError),
@@ -10,7 +10,7 @@
 
§

Write(WriteError)

Error when writing the request to the SendStream.

§

Closed(ClosedStream)

Quic connection is closed.

§

Io(Error)

A generic io error

-

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<ClosedStream> for ConnectedNextError

§

fn from(source: ClosedStream) -> ConnectedNextError

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<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 +

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<ClosedStream> for ConnectedNextError

source§

fn from(source: ClosedStream) -> ConnectedNextError

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<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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/enum.DecodeError.html b/pr/2656/docs/iroh/blobs/get/fsm/enum.DecodeError.html index 35686cd543..ac62d60e11 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/enum.DecodeError.html +++ b/pr/2656/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

pub enum DecodeError {
+DecodeError in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::DecodeError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/enum.EndBlobNext.html b/pr/2656/docs/iroh/blobs/get/fsm/enum.EndBlobNext.html index 89a5d388da..fce95aecda 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/enum.EndBlobNext.html +++ b/pr/2656/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

pub enum EndBlobNext {
+EndBlobNext in iroh::blobs::get::fsm - Rust

Enum iroh::blobs::get::fsm::EndBlobNext

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/fn.start.html b/pr/2656/docs/iroh/blobs/get/fsm/fn.start.html index 0f257f1910..f859a72e11 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/fn.start.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/blobs/get/fsm/index.html b/pr/2656/docs/iroh/blobs/get/fsm/index.html index 3ada3cff03..c630f81aff 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/index.html +++ b/pr/2656/docs/iroh/blobs/get/fsm/index.html @@ -1,4 +1,4 @@ -iroh::blobs::get::fsm - Rust

Module iroh::blobs::get::fsm

Expand description

Finite state machine for get responses.

+iroh::blobs::get::fsm - Rust

Module iroh::blobs::get::fsm

source ·
Expand description

Finite state machine for get responses.

This is the low level API for getting data from a peer.

diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtBlobContent.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtBlobContent.html index aeb03c330b..d491245efd 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtBlobContent.html +++ b/pr/2656/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

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( +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( self ) -> Result<(AtEndBlob, Vec<u8>), DecodeError>

Concatenate the entire response into a vec

-

pub async fn write_all_batch<B>( +

source

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.

-

pub async fn write_all_with_outboard<D, O>( +

source

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.

-

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>
where +

source

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>

Write the entire blob to a slice writer.

-

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtBlobHeader.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtBlobHeader.html index ccc35e1a04..89beb42fa3 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtBlobHeader.html +++ b/pr/2656/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

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( +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( 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.

-

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>
where +

source

pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>

Write the entire blob to a slice writer.

-

pub async fn write_all_with_outboard<D, O>( +

source

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.

-

pub async fn write_all_batch<B>( +

source

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.

-

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtClosing.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtClosing.html index 587245d7de..aa8101c09e 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtClosing.html +++ b/pr/2656/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

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 +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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtConnected.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtConnected.html index a859a51312..91862f7d5c 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtConnected.html +++ b/pr/2656/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

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

+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

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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtEndBlob.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtEndBlob.html index 62bf6267f1..d02d582f9d 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtEndBlob.html +++ b/pr/2656/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

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 +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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtInitial.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtInitial.html index 6aae628a80..96b35f5f43 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtInitial.html +++ b/pr/2656/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

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

+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

connection is an existing connection request is the request to be sent

-

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtStartChild.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtStartChild.html index f2ab90c279..6181d9d6b9 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtStartChild.html +++ b/pr/2656/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

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

+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

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.

-

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

+
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

This requires passing in the hash of the child for validation

-

pub fn finish(self) -> AtClosing

Finish the get response without reading further

+
source

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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtStartRoot.html b/pr/2656/docs/iroh/blobs/get/fsm/struct.AtStartRoot.html index 1484b7c394..e6464ac017 100644 --- a/pr/2656/docs/iroh/blobs/get/fsm/struct.AtStartRoot.html +++ b/pr/2656/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

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

+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

For the collection we already know the hash, since it was part of the request

-

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/index.html b/pr/2656/docs/iroh/blobs/get/index.html index cde21c8807..99b8071389 100644 --- a/pr/2656/docs/iroh/blobs/get/index.html +++ b/pr/2656/docs/iroh/blobs/get/index.html @@ -1,4 +1,4 @@ -iroh::blobs::get - Rust

Module iroh::blobs::get

Expand description

The client side API

+iroh::blobs::get - Rust

Module iroh::blobs::get

source ·
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/2656/docs/iroh/blobs/get/progress/enum.BlobProgress.html b/pr/2656/docs/iroh/blobs/get/progress/enum.BlobProgress.html index 68491b6989..ef4505764f 100644 --- a/pr/2656/docs/iroh/blobs/get/progress/enum.BlobProgress.html +++ b/pr/2656/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

pub enum BlobProgress {
+BlobProgress in iroh::blobs::get::progress - Rust

Enum iroh::blobs::get::progress::BlobProgress

source ·
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§

§

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>( +

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

source§

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
§

impl PartialEq for BlobProgress

§

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

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 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 Serialize for BlobProgress

§

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

source§

impl Serialize for BlobProgress

source§

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
§

impl Eq for BlobProgress

§

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

source§

impl Eq for BlobProgress

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/progress/index.html b/pr/2656/docs/iroh/blobs/get/progress/index.html index 3f9e113035..25b0068ef7 100644 --- a/pr/2656/docs/iroh/blobs/get/progress/index.html +++ b/pr/2656/docs/iroh/blobs/get/progress/index.html @@ -1,2 +1,2 @@ -iroh::blobs::get::progress - Rust

Module iroh::blobs::get::progress

Expand description

Types for get progress state management.

+iroh::blobs::get::progress - Rust

Module iroh::blobs::get::progress

source ·
Expand description

Types for get progress state management.

Structs§

Enums§

Type Aliases§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/get/progress/struct.BlobState.html b/pr/2656/docs/iroh/blobs/get/progress/struct.BlobState.html index a235a56a2e..fd9a8ea365 100644 --- a/pr/2656/docs/iroh/blobs/get/progress/struct.BlobState.html +++ b/pr/2656/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

pub struct BlobState {
+BlobState in iroh::blobs::get::progress - Rust

Struct iroh::blobs::get::progress::BlobState

source ·
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§

§

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>( +

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

source§

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
§

impl PartialEq for BlobState

§

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

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 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 Serialize for BlobState

§

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

source§

impl Serialize for BlobState

source§

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
§

impl Eq for BlobState

§

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

source§

impl Eq for BlobState

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/progress/struct.TransferState.html b/pr/2656/docs/iroh/blobs/get/progress/struct.TransferState.html index 24220fd380..bfe9b6c9c0 100644 --- a/pr/2656/docs/iroh/blobs/get/progress/struct.TransferState.html +++ b/pr/2656/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

pub struct TransferState {
+TransferState in iroh::blobs::get::progress - Rust

Struct iroh::blobs::get::progress::TransferState

source ·
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§

§

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>( +

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

source§

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
§

impl PartialEq for TransferState

§

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
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 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 Serialize for TransferState

§

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

source§

impl Serialize for TransferState

source§

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
§

impl Eq for TransferState

§

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
source§

impl Eq for TransferState

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/get/progress/type.ProgressId.html b/pr/2656/docs/iroh/blobs/get/progress/type.ProgressId.html index 99ecf09324..1d65e2eaeb 100644 --- a/pr/2656/docs/iroh/blobs/get/progress/type.ProgressId.html +++ b/pr/2656/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

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

source ·
pub type ProgressId = u64;
Expand description

The identifier for progress events.

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/get/request/fn.get_chunk_probe.html b/pr/2656/docs/iroh/blobs/get/request/fn.get_chunk_probe.html index 1945b44466..129410660f 100644 --- a/pr/2656/docs/iroh/blobs/get/request/fn.get_chunk_probe.html +++ b/pr/2656/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

pub async fn get_chunk_probe(
+get_chunk_probe in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_chunk_probe

source ·
pub async fn get_chunk_probe(
     connection: &Connection,
     hash: &Hash,
     chunk: ChunkNum
diff --git a/pr/2656/docs/iroh/blobs/get/request/fn.get_hash_seq_and_sizes.html b/pr/2656/docs/iroh/blobs/get/request/fn.get_hash_seq_and_sizes.html
index ebcd03bca5..0feb9e96af 100644
--- a/pr/2656/docs/iroh/blobs/get/request/fn.get_hash_seq_and_sizes.html
+++ b/pr/2656/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

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

source ·
pub async fn get_hash_seq_and_sizes(
     connection: &Connection,
     hash: &Hash,
     max_size: u64
diff --git a/pr/2656/docs/iroh/blobs/get/request/fn.get_unverified_size.html b/pr/2656/docs/iroh/blobs/get/request/fn.get_unverified_size.html
index 42537ca91a..6ecf070366 100644
--- a/pr/2656/docs/iroh/blobs/get/request/fn.get_unverified_size.html
+++ b/pr/2656/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

pub async fn get_unverified_size(
+get_unverified_size in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_unverified_size

source ·
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/2656/docs/iroh/blobs/get/request/fn.get_verified_size.html b/pr/2656/docs/iroh/blobs/get/request/fn.get_verified_size.html index 28185c661f..326d55db85 100644 --- a/pr/2656/docs/iroh/blobs/get/request/fn.get_verified_size.html +++ b/pr/2656/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

pub async fn get_verified_size(
+get_verified_size in iroh::blobs::get::request - Rust

Function iroh::blobs::get::request::get_verified_size

source ·
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/2656/docs/iroh/blobs/get/request/fn.random_hash_seq_ranges.html b/pr/2656/docs/iroh/blobs/get/request/fn.random_hash_seq_ranges.html index 8f932a60bf..a1396f0185 100644 --- a/pr/2656/docs/iroh/blobs/get/request/fn.random_hash_seq_ranges.html +++ b/pr/2656/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

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

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 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/2656/docs/iroh/blobs/get/request/index.html b/pr/2656/docs/iroh/blobs/get/request/index.html index 6f1491ebed..ba1e55c21a 100644 --- a/pr/2656/docs/iroh/blobs/get/request/index.html +++ b/pr/2656/docs/iroh/blobs/get/request/index.html @@ -1,4 +1,4 @@ -iroh::blobs::get::request - Rust

Module iroh::blobs::get::request

Expand description

Utilities for complex get requests.

+iroh::blobs::get::request - Rust

Module iroh::blobs::get::request

source ·
Expand description

Utilities for complex get requests.

Functions§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/get/struct.Stats.html b/pr/2656/docs/iroh/blobs/get/struct.Stats.html index fb3f037307..c853ffa3e1 100644 --- a/pr/2656/docs/iroh/blobs/get/struct.Stats.html +++ b/pr/2656/docs/iroh/blobs/get/struct.Stats.html @@ -1,4 +1,4 @@ -Stats in iroh::blobs::get - Rust

Struct iroh::blobs::get::Stats

pub struct Stats {
+Stats in iroh::blobs::get - Rust

Struct iroh::blobs::get::Stats

source ·
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§

§

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>( +

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

source§

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
§

impl PartialEq for Stats

§

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
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 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 Serialize for Stats

§

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

source§

impl Serialize for Stats

source§

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
§

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 + __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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/hashseq/fn.parse_hash_seq.html b/pr/2656/docs/iroh/blobs/hashseq/fn.parse_hash_seq.html index 93d196b5b9..49ff088bc6 100644 --- a/pr/2656/docs/iroh/blobs/hashseq/fn.parse_hash_seq.html +++ b/pr/2656/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

pub async fn parse_hash_seq<'a, R>(
+parse_hash_seq in iroh::blobs::hashseq - Rust

Function iroh::blobs::hashseq::parse_hash_seq

source ·
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/2656/docs/iroh/blobs/hashseq/index.html b/pr/2656/docs/iroh/blobs/hashseq/index.html index 9a1d3e6003..7cc59ecb23 100644 --- a/pr/2656/docs/iroh/blobs/hashseq/index.html +++ b/pr/2656/docs/iroh/blobs/hashseq/index.html @@ -1,2 +1,2 @@ -iroh::blobs::hashseq - Rust

Module iroh::blobs::hashseq

Expand description

traits related to collections of blobs

+iroh::blobs::hashseq - Rust

Module iroh::blobs::hashseq

source ·
Expand description

traits related to collections of blobs

Structs§

Functions§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeq.html b/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeq.html index 0704c22c32..c764ecf626 100644 --- a/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeq.html +++ b/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeq.html @@ -1,13 +1,13 @@ -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 +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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeqIter.html b/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeqIter.html index a6dea71ef5..3e08d6f253 100644 --- a/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeqIter.html +++ b/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeqIter.html @@ -1,5 +1,5 @@ -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>( +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>( &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/2656/docs/iroh/blobs/hashseq/struct.HashSeqStream.html b/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeqStream.html index 59a3e161cd..27d9ede675 100644 --- a/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeqStream.html +++ b/pr/2656/docs/iroh/blobs/hashseq/struct.HashSeqStream.html @@ -1,8 +1,8 @@ -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.

+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.

todo: make this wrap a reader instead of a HashSeq.

-

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/index.html b/pr/2656/docs/iroh/blobs/index.html index fe1decd9f3..d6706127c3 100644 --- a/pr/2656/docs/iroh/blobs/index.html +++ b/pr/2656/docs/iroh/blobs/index.html @@ -1,4 +1,4 @@ -iroh::blobs - Rust

Crate iroh::blobs

Expand description

Blobs layer for iroh.

+iroh::blobs - Rust

Crate iroh::blobs

source ·
Expand description

Blobs layer for iroh.

The crate is designed to be used from the iroh crate, which provides a high level interface, but can also be used standalone.

diff --git a/pr/2656/docs/iroh/blobs/metrics/index.html b/pr/2656/docs/iroh/blobs/metrics/index.html index cdb7679197..851f6464c0 100644 --- a/pr/2656/docs/iroh/blobs/metrics/index.html +++ b/pr/2656/docs/iroh/blobs/metrics/index.html @@ -1,2 +1,2 @@ -iroh::blobs::metrics - Rust

Module iroh::blobs::metrics

Expand description

Metrics for iroh-blobs

+iroh::blobs::metrics - Rust

Module iroh::blobs::metrics

source ·
Expand description

Metrics for iroh-blobs

Structs§

  • Enum of metrics for the module
\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/metrics/struct.Metrics.html b/pr/2656/docs/iroh/blobs/metrics/struct.Metrics.html index 1d8dc8c03d..156cf3c231 100644 --- a/pr/2656/docs/iroh/blobs/metrics/struct.Metrics.html +++ b/pr/2656/docs/iroh/blobs/metrics/struct.Metrics.html @@ -1,20 +1,20 @@ -Metrics in iroh::blobs::metrics - Rust

Struct iroh::blobs::metrics::Metrics

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,
+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,
 }
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§

§

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 +

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<(), 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/protocol/constant.ALPN.html b/pr/2656/docs/iroh/blobs/protocol/constant.ALPN.html index b04a30edf5..72294f0c14 100644 --- a/pr/2656/docs/iroh/blobs/protocol/constant.ALPN.html +++ b/pr/2656/docs/iroh/blobs/protocol/constant.ALPN.html @@ -1,2 +1,2 @@ -ALPN in iroh::blobs::protocol - Rust

Constant iroh::blobs::protocol::ALPN

pub const ALPN: &'static [u8];
Expand description

The ALPN used with quic for the iroh bytes protocol.

+ALPN in iroh::blobs::protocol - Rust

Constant iroh::blobs::protocol::ALPN

source ·
pub const ALPN: &'static [u8];
Expand description

The ALPN used with quic for the iroh bytes protocol.

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/protocol/constant.MAX_MESSAGE_SIZE.html b/pr/2656/docs/iroh/blobs/protocol/constant.MAX_MESSAGE_SIZE.html index fad1a298c2..285a9dbb49 100644 --- a/pr/2656/docs/iroh/blobs/protocol/constant.MAX_MESSAGE_SIZE.html +++ b/pr/2656/docs/iroh/blobs/protocol/constant.MAX_MESSAGE_SIZE.html @@ -1,2 +1,2 @@ -MAX_MESSAGE_SIZE in iroh::blobs::protocol - Rust

Constant iroh::blobs::protocol::MAX_MESSAGE_SIZE

pub const MAX_MESSAGE_SIZE: usize = _; // 104_857_600usize
Expand description

Maximum message size is limited to 100MiB for now.

+MAX_MESSAGE_SIZE in iroh::blobs::protocol - Rust

Constant iroh::blobs::protocol::MAX_MESSAGE_SIZE

source ·
pub const MAX_MESSAGE_SIZE: usize = _; // 104_857_600usize
Expand description

Maximum message size is limited to 100MiB for now.

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/protocol/enum.Closed.html b/pr/2656/docs/iroh/blobs/protocol/enum.Closed.html index a404da466f..a5ae2f486f 100644 --- a/pr/2656/docs/iroh/blobs/protocol/enum.Closed.html +++ b/pr/2656/docs/iroh/blobs/protocol/enum.Closed.html @@ -1,4 +1,4 @@ -Closed in iroh::blobs::protocol - Rust

Enum iroh::blobs::protocol::Closed

#[repr(u16)]
pub enum Closed { +Closed in iroh::blobs::protocol - Rust

Enum iroh::blobs::protocol::Closed

source ·
#[repr(u16)]
pub enum Closed { StreamDropped = 0, ProviderTerminating = 1, RequestReceived = 2, @@ -16,13 +16,13 @@
§

RequestReceived = 2

The provider has received the request.

Only a single request is allowed on a stream, if more data is received after this a provider may send this error code in a STOP_STREAM frame.

-

Implementations§

§

impl Closed

pub fn reason(&self) -> &'static [u8]

The close reason as bytes. This is a valid utf8 string describing the reason.

-

Trait Implementations§

§

impl Clone for Closed

§

fn clone(&self) -> Closed

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 Closed

§

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 Hash for Closed

§

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

Implementations§

source§

impl Closed

source

pub fn reason(&self) -> &'static [u8]

The close reason as bytes. This is a valid utf8 string describing the reason.

+

Trait Implementations§

source§

impl Clone for Closed

source§

fn clone(&self) -> Closed

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 Closed

source§

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.
source§

impl Hash for Closed

source§

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 for Closed

§

fn eq(&self, other: &Closed) -> 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
source§

impl PartialEq for Closed

source§

fn eq(&self, other: &Closed) -> 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 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 +sufficient, and should not be overridden without very good reason.

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.
source§

impl Copy for Closed

source§

impl Eq for Closed

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/protocol/enum.Request.html b/pr/2656/docs/iroh/blobs/protocol/enum.Request.html index fcc306ba1e..c004bd57e9 100644 --- a/pr/2656/docs/iroh/blobs/protocol/enum.Request.html +++ b/pr/2656/docs/iroh/blobs/protocol/enum.Request.html @@ -1,17 +1,17 @@ -Request in iroh::blobs::protocol - Rust

Enum iroh::blobs::protocol::Request

pub enum Request {
+Request in iroh::blobs::protocol - Rust

Enum iroh::blobs::protocol::Request

source ·
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§

§

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>( +

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

source§

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
§

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 + __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 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 Serialize for Request

§

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

source§

impl Serialize for Request

source§

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
§

impl Eq for Request

§

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

source§

impl Eq for Request

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/protocol/index.html b/pr/2656/docs/iroh/blobs/protocol/index.html index 25c4cf30a6..8fcd3b7da3 100644 --- a/pr/2656/docs/iroh/blobs/protocol/index.html +++ b/pr/2656/docs/iroh/blobs/protocol/index.html @@ -1,4 +1,4 @@ -iroh::blobs::protocol - Rust

Module iroh::blobs::protocol

Expand description

Protocol for transferring content-addressed blobs and collections over quic +iroh::blobs::protocol - Rust

Module iroh::blobs::protocol

source ·
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/2656/docs/iroh/blobs/protocol/struct.GetRequest.html b/pr/2656/docs/iroh/blobs/protocol/struct.GetRequest.html index c1469b0fd1..038c588b45 100644 --- a/pr/2656/docs/iroh/blobs/protocol/struct.GetRequest.html +++ b/pr/2656/docs/iroh/blobs/protocol/struct.GetRequest.html @@ -1,27 +1,27 @@ -GetRequest in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::GetRequest

pub struct GetRequest {
+GetRequest in iroh::blobs::protocol - Rust

Struct iroh::blobs::protocol::GetRequest

source ·
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§

§

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

+

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

This can be used to get the verified size of a blob.

-

pub fn last_chunks(hash: Hash) -> GetRequest

Request the last chunk for all children

+
source

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§

§

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>( +

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

source§

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
§

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 + __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 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 Serialize for GetRequest

§

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

source§

impl Serialize for GetRequest

source§

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
§

impl Eq for GetRequest

§

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
source§

impl Eq for GetRequest

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html b/pr/2656/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html index 46eebf73a4..0eb83a0d89 100644 --- a/pr/2656/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html +++ b/pr/2656/docs/iroh/blobs/protocol/struct.NonEmptyRequestRangeSpecIter.html @@ -1,6 +1,6 @@ -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.

+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.

default is what to use if the children of this RequestRangeSpec are empty.

-

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( +

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( &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/2656/docs/iroh/blobs/protocol/struct.RangeSpec.html b/pr/2656/docs/iroh/blobs/protocol/struct.RangeSpec.html index c3d50684b9..7dd6256d03 100644 --- a/pr/2656/docs/iroh/blobs/protocol/struct.RangeSpec.html +++ b/pr/2656/docs/iroh/blobs/protocol/struct.RangeSpec.html @@ -1,4 +1,4 @@ -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.

+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.

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§

§

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.

+

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.

This is called “empty” because the representation is an empty set.

-

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>( +

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

source§

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
§

impl Hash for RangeSpec

§

fn hash<__H>(&self, state: &mut __H)
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 __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 for RangeSpec

§

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
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 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 Serialize for RangeSpec

§

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

source§

impl Serialize for RangeSpec

source§

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
§

impl Eq for RangeSpec

§

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

source§

impl Eq for RangeSpec

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html b/pr/2656/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html index 755bccec4e..c7db9643ee 100644 --- a/pr/2656/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html +++ b/pr/2656/docs/iroh/blobs/protocol/struct.RangeSpecSeq.html @@ -1,4 +1,4 @@ -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.

+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.

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§

§

impl RangeSpecSeq

pub const fn empty() -> RangeSpecSeq

A RangeSpecSeq containing no chunks from any blobs in the sequence.

+

Implementations§

source§

impl RangeSpecSeq

source

pub const fn empty() -> RangeSpecSeq

A RangeSpecSeq containing no chunks from any blobs in the sequence.

RangeSpecSeq::iter, will return an empty range forever.

-

pub fn as_single(&self) -> Option<(u64, &RangeSpec)>

If this range seq describes a range for a single item, returns the offset +

source

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

-

pub fn all() -> RangeSpecSeq

A RangeSpecSeq containing all chunks from all blobs.

+
source

pub fn all() -> RangeSpecSeq

A RangeSpecSeq containing all chunks from all blobs.

RangeSpecSeq::iter, will return a full range forever.

-

pub fn from_ranges( +

source

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.

-

pub fn from_ranges_infinite( +

source

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.

-

pub fn new(children: impl IntoIterator<Item = RangeSpec>) -> RangeSpecSeq

Creates a new range spec sequence from a sequence of range specs.

+
source

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.

-

pub fn iter(&self) -> RequestRangeSpecIter<'_>

An infinite iterator of range specs for blobs in the sequence.

+
source

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.

-

pub fn iter_non_empty(&self) -> NonEmptyRequestRangeSpecIter<'_>

An iterator over blobs in the sequence with a non-empty range spec.

+
source

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§

§

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>( +

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

source§

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
§

impl Hash for RangeSpecSeq

§

fn hash<__H>(&self, state: &mut __H)
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 __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 for RangeSpecSeq

§

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
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 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 Serialize for RangeSpecSeq

§

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

source§

impl Serialize for RangeSpecSeq

source§

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
§

impl Eq for RangeSpecSeq

§

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
source§

impl Eq for RangeSpecSeq

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html b/pr/2656/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html index 3fc205b6ab..2fc721a970 100644 --- a/pr/2656/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html +++ b/pr/2656/docs/iroh/blobs/protocol/struct.UnknownErrorCode.html @@ -1,5 +1,5 @@ -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 +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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/provider/enum.AddProgress.html b/pr/2656/docs/iroh/blobs/provider/enum.AddProgress.html index ce2143673e..118c0381f3 100644 --- a/pr/2656/docs/iroh/blobs/provider/enum.AddProgress.html +++ b/pr/2656/docs/iroh/blobs/provider/enum.AddProgress.html @@ -1,4 +1,4 @@ -AddProgress in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::AddProgress

pub enum AddProgress {
+AddProgress in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::AddProgress

source ·
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§

§

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>( +

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

source§

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
§

impl Serialize for AddProgress

§

fn serialize<__S>( + __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 as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/blobs/provider/enum.BatchAddPathProgress.html b/pr/2656/docs/iroh/blobs/provider/enum.BatchAddPathProgress.html index 93dfa80128..c34c24b32d 100644 --- a/pr/2656/docs/iroh/blobs/provider/enum.BatchAddPathProgress.html +++ b/pr/2656/docs/iroh/blobs/provider/enum.BatchAddPathProgress.html @@ -1,4 +1,4 @@ -BatchAddPathProgress in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::BatchAddPathProgress

pub enum BatchAddPathProgress {
+BatchAddPathProgress in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::BatchAddPathProgress

source ·
pub enum BatchAddPathProgress {
     Found {
         size: u64,
     },
@@ -18,10 +18,10 @@
 

Fields

§hash: Hash

The hash of the entry.

§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

-

Trait Implementations§

§

impl Debug for BatchAddPathProgress

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for BatchAddPathProgress

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Debug for BatchAddPathProgress

source§

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

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

impl<'de> Deserialize<'de> for BatchAddPathProgress

source§

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

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

impl Serialize for BatchAddPathProgress

§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Serialize for BatchAddPathProgress

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/blobs/provider/enum.Event.html b/pr/2656/docs/iroh/blobs/provider/enum.Event.html index cd51897ea2..063cf3d49f 100644 --- a/pr/2656/docs/iroh/blobs/provider/enum.Event.html +++ b/pr/2656/docs/iroh/blobs/provider/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::Event

pub enum Event {
+Event in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::Event

source ·
pub enum Event {
     TaggedBlobAdded {
         hash: Hash,
         format: BlobFormat,
@@ -77,7 +77,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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/provider/enum.SentStatus.html b/pr/2656/docs/iroh/blobs/provider/enum.SentStatus.html index 29d6c8ae9c..47e8127947 100644 --- a/pr/2656/docs/iroh/blobs/provider/enum.SentStatus.html +++ b/pr/2656/docs/iroh/blobs/provider/enum.SentStatus.html @@ -1,12 +1,12 @@ -SentStatus in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::SentStatus

pub enum SentStatus {
+SentStatus in iroh::blobs::provider - Rust

Enum iroh::blobs::provider::SentStatus

source ·
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§

§

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 +

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 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 SentStatus

§

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.

source§

impl Eq for SentStatus

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/provider/fn.handle_connection.html b/pr/2656/docs/iroh/blobs/provider/fn.handle_connection.html index 71c78d9cea..d123e8a89d 100644 --- a/pr/2656/docs/iroh/blobs/provider/fn.handle_connection.html +++ b/pr/2656/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

pub async fn handle_connection<D>(
+handle_connection in iroh::blobs::provider - Rust

Function iroh::blobs::provider::handle_connection

source ·
pub async fn handle_connection<D>(
     connection: Connection,
     db: D,
     events: EventSender,
diff --git a/pr/2656/docs/iroh/blobs/provider/fn.handle_get.html b/pr/2656/docs/iroh/blobs/provider/fn.handle_get.html
index 104f05df4b..0901f8f5f4 100644
--- a/pr/2656/docs/iroh/blobs/provider/fn.handle_get.html
+++ b/pr/2656/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

pub async fn handle_get<D>(
+handle_get in iroh::blobs::provider - Rust

Function iroh::blobs::provider::handle_get

source ·
pub async fn handle_get<D>(
     db: D,
     request: GetRequest,
     writer: ResponseWriter
diff --git a/pr/2656/docs/iroh/blobs/provider/fn.read_request.html b/pr/2656/docs/iroh/blobs/provider/fn.read_request.html
index aa35d536b6..f1f2e08084 100644
--- a/pr/2656/docs/iroh/blobs/provider/fn.read_request.html
+++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/blobs/provider/fn.send_blob.html b/pr/2656/docs/iroh/blobs/provider/fn.send_blob.html index 8a7f213646..3fe6c3cb34 100644 --- a/pr/2656/docs/iroh/blobs/provider/fn.send_blob.html +++ b/pr/2656/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

pub async fn send_blob<D, W>(
+send_blob in iroh::blobs::provider - Rust

Function iroh::blobs::provider::send_blob

source ·
pub async fn send_blob<D, W>(
     db: &D,
     hash: Hash,
     ranges: &RangeSpec,
diff --git a/pr/2656/docs/iroh/blobs/provider/index.html b/pr/2656/docs/iroh/blobs/provider/index.html
index 8c8fb4da1a..cc62deaf45 100644
--- a/pr/2656/docs/iroh/blobs/provider/index.html
+++ b/pr/2656/docs/iroh/blobs/provider/index.html
@@ -1,2 +1,2 @@
-iroh::blobs::provider - Rust

Module iroh::blobs::provider

Expand description

The server side API

+iroh::blobs::provider - Rust

Module iroh::blobs::provider

source ·
Expand description

The server side API

Structs§

  • A sender for events related to blob transfers.
  • A helper struct that combines a quinn::SendStream with auxiliary information
  • The stats for a transfer of a collection or blob.

Enums§

Traits§

Functions§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/provider/struct.EventSender.html b/pr/2656/docs/iroh/blobs/provider/struct.EventSender.html index f6f149c194..1fafd98a3c 100644 --- a/pr/2656/docs/iroh/blobs/provider/struct.EventSender.html +++ b/pr/2656/docs/iroh/blobs/provider/struct.EventSender.html @@ -1,16 +1,16 @@ -EventSender in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::EventSender

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

A sender for events related to blob transfers.

+EventSender in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::EventSender

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

A sender for events related to blob transfers.

The sender is disabled by default.

-

Implementations§

§

impl EventSender

pub fn new(inner: Option<Arc<dyn CustomEventSender>>) -> EventSender

Create a new event sender.

-

pub async fn send(&self, event: impl FnOnce() -> Event)

Send an event.

+

Implementations§

source§

impl EventSender

source

pub fn new(inner: Option<Arc<dyn CustomEventSender>>) -> EventSender

Create a new event sender.

+
source

pub async fn send(&self, event: impl FnOnce() -> Event)

Send an event.

If the inner sender is not set, the function to produce the event will not be called. So any cost associated with gathering information for the event will not be incurred.

-

pub fn try_send(&self, event: impl FnOnce() -> Event)

Try to send an event.

+
source

pub fn try_send(&self, event: impl FnOnce() -> Event)

Try to send an event.

This will just drop the event if it can not be sent immediately. So it is only appropriate for events that are not critical, such as self-contained progress updates.

-

Trait Implementations§

§

impl Clone for EventSender

§

fn clone(&self) -> EventSender

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 EventSender

§

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

Formats the value using the given formatter. Read more
§

impl Default for EventSender

§

fn default() -> EventSender

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

impl<T> From<T> for EventSender
where - T: CustomEventSender,

§

fn from(inner: T) -> EventSender

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Clone for EventSender

source§

fn clone(&self) -> EventSender

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 EventSender

source§

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

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

impl Default for EventSender

source§

fn default() -> EventSender

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

impl<T> From<T> for EventSender
where + T: CustomEventSender,

source§

fn from(inner: T) -> EventSender

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/provider/struct.ResponseWriter.html b/pr/2656/docs/iroh/blobs/provider/struct.ResponseWriter.html index 88ff08c950..2d9d96e521 100644 --- a/pr/2656/docs/iroh/blobs/provider/struct.ResponseWriter.html +++ b/pr/2656/docs/iroh/blobs/provider/struct.ResponseWriter.html @@ -1,5 +1,5 @@ -ResponseWriter in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::ResponseWriter

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

A helper struct that combines a quinn::SendStream with auxiliary information

-

Trait Implementations§

§

impl Debug for ResponseWriter

§

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 +ResponseWriter in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::ResponseWriter

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

A helper struct that combines a quinn::SendStream with auxiliary information

+

Trait Implementations§

source§

impl Debug for ResponseWriter

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/provider/struct.TransferStats.html b/pr/2656/docs/iroh/blobs/provider/struct.TransferStats.html index 458610206f..3086f24d35 100644 --- a/pr/2656/docs/iroh/blobs/provider/struct.TransferStats.html +++ b/pr/2656/docs/iroh/blobs/provider/struct.TransferStats.html @@ -1,4 +1,4 @@ -TransferStats in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::TransferStats

pub struct TransferStats {
+TransferStats in iroh::blobs::provider - Rust

Struct iroh::blobs::provider::TransferStats

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/provider/trait.CustomEventSender.html b/pr/2656/docs/iroh/blobs/provider/trait.CustomEventSender.html index 11ec9ae053..4ad4348a75 100644 --- a/pr/2656/docs/iroh/blobs/provider/trait.CustomEventSender.html +++ b/pr/2656/docs/iroh/blobs/provider/trait.CustomEventSender.html @@ -1,8 +1,8 @@ -CustomEventSender in iroh::blobs::provider - Rust

Trait iroh::blobs::provider::CustomEventSender

pub trait CustomEventSender: Debug + Sync + Send + 'static {
+CustomEventSender in iroh::blobs::provider - Rust

Trait iroh::blobs::provider::CustomEventSender

source ·
pub trait CustomEventSender: Debug + Sync + Send + 'static {
     // Required methods
     fn send(&self, event: Event) -> Pin<Box<dyn Future<Output = ()> + Send>>;
     fn try_send(&self, event: Event);
 }
Expand description

Trait for sending blob events.

-

Required Methods§

fn send(&self, event: Event) -> Pin<Box<dyn Future<Output = ()> + Send>>

Send an event and wait for it to be sent.

-

fn try_send(&self, event: Event)

Try to send an event.

+

Required Methods§

source

fn send(&self, event: Event) -> Pin<Box<dyn Future<Output = ()> + Send>>

Send an event and wait for it to be sent.

+
source

fn try_send(&self, event: Event)

Try to send an event.

Implementors§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/store/bao_tree/blake3/struct.Hash.html b/pr/2656/docs/iroh/blobs/store/bao_tree/blake3/struct.Hash.html index 46f76c38db..938ba0f701 100644 --- a/pr/2656/docs/iroh/blobs/store/bao_tree/blake3/struct.Hash.html +++ b/pr/2656/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.
§

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 +

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 __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/2656/docs/iroh/blobs/store/bao_tree/io/enum.DecodeError.html b/pr/2656/docs/iroh/blobs/store/bao_tree/io/enum.DecodeError.html index 4fa1d5581f..959f8ed18a 100644 --- a/pr/2656/docs/iroh/blobs/store/bao_tree/io/enum.DecodeError.html +++ b/pr/2656/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
§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/bao_tree/io/fsm/trait.AsyncSliceWriter.html b/pr/2656/docs/iroh/blobs/store/bao_tree/io/fsm/trait.AsyncSliceWriter.html index d9472584be..460062225c 100644 --- a/pr/2656/docs/iroh/blobs/store/bao_tree/io/fsm/trait.AsyncSliceWriter.html +++ b/pr/2656/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,

§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where + W: AsyncSliceWriter,

source§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where W: AsyncSliceWriter + 'static, - F: Fn(u64, usize) -> Result<(), Error> + 'static,

§

impl<W, F> AsyncSliceWriter for ProgressSliceWriter<W, F>
where + F: Fn(u64, usize) -> Result<(), Error> + 'static,

source§

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/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.ReadAt.html b/pr/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.ReadAt.html index c886960bc3..cda522e533 100644 --- a/pr/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.ReadAt.html +++ b/pr/2656/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§

§

impl ReadAt for MemOrFile<Bytes, File>

§

impl ReadAt for SparseMemFile

source§

impl ReadAt for RandomAccessFile

source§

impl<I> ReadAt for Slice<I>
where + R: ReadAt + ?Sized,

source§

fn read_at(&self, pos: u64, buf: &mut [u8]) -> Result<usize, Error>

Implementors§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.Size.html b/pr/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.Size.html index 2b178fbca3..9e5e037d2a 100644 --- a/pr/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.Size.html +++ b/pr/2656/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/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.WriteAt.html b/pr/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.WriteAt.html index 568e2a9dd8..f74f9f393e 100644 --- a/pr/2656/docs/iroh/blobs/store/bao_tree/io/sync/trait.WriteAt.html +++ b/pr/2656/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/2656/docs/iroh/blobs/store/enum.BaoBlobSize.html b/pr/2656/docs/iroh/blobs/store/enum.BaoBlobSize.html index 5f82d12058..de8ae57e1e 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.BaoBlobSize.html +++ b/pr/2656/docs/iroh/blobs/store/enum.BaoBlobSize.html @@ -1,21 +1,21 @@ -BaoBlobSize in iroh::blobs::store - Rust

Enum iroh::blobs::store::BaoBlobSize

pub enum BaoBlobSize {
+BaoBlobSize in iroh::blobs::store - Rust

Enum iroh::blobs::store::BaoBlobSize

source ·
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§

§

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>( +

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

source§

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
§

impl PartialEq for BaoBlobSize

§

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
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 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 Serialize for BaoBlobSize

§

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

source§

impl Serialize for BaoBlobSize

source§

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
§

impl Copy for BaoBlobSize

§

impl Eq for BaoBlobSize

§

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
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html b/pr/2656/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html index 0145d03e33..618b94a6eb 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ConsistencyCheckProgress.html @@ -1,4 +1,4 @@ -ConsistencyCheckProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ConsistencyCheckProgress

pub enum ConsistencyCheckProgress {
+ConsistencyCheckProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ConsistencyCheckProgress

source ·
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§

§

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>( +

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

source§

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
§

impl Serialize for ConsistencyCheckProgress

§

fn serialize<__S>( + __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 as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/blobs/store/enum.EntryStatus.html b/pr/2656/docs/iroh/blobs/store/enum.EntryStatus.html index 1fbd4142c1..8c4c0589fc 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.EntryStatus.html +++ b/pr/2656/docs/iroh/blobs/store/enum.EntryStatus.html @@ -1,4 +1,4 @@ -EntryStatus in iroh::blobs::store - Rust

Enum iroh::blobs::store::EntryStatus

pub enum EntryStatus {
+EntryStatus in iroh::blobs::store - Rust

Enum iroh::blobs::store::EntryStatus

source ·
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§

§

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 +

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 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 EntryStatus

§

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.

source§

impl Eq for EntryStatus

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.Event.html b/pr/2656/docs/iroh/blobs/store/enum.Event.html index 9963a3dff6..c7e380bb73 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.Event.html +++ b/pr/2656/docs/iroh/blobs/store/enum.Event.html @@ -1,12 +1,12 @@ -Event in iroh::blobs::store - Rust

Enum iroh::blobs::store::Event

pub enum Event {
+Event in iroh::blobs::store - Rust

Enum iroh::blobs::store::Event

source ·
pub enum Event {
     GcStarted,
     GcCompleted,
 }
Expand description

Database events

Variants§

§

GcStarted

A GC was started

§

GcCompleted

A GC was completed

-

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 +

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 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 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 +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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.ExportFormat.html b/pr/2656/docs/iroh/blobs/store/enum.ExportFormat.html index 5be3c88bb6..015e3aa28b 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ExportFormat.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ExportFormat.html @@ -1,4 +1,4 @@ -ExportFormat in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportFormat

pub enum ExportFormat {
+ExportFormat in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportFormat

source ·
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§

§

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>( +

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

source§

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
§

impl Serialize for ExportFormat

§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

source§

impl Serialize for ExportFormat

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/blobs/store/enum.ExportMode.html b/pr/2656/docs/iroh/blobs/store/enum.ExportMode.html index 26c81627cc..be91c58189 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ExportMode.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ExportMode.html @@ -1,4 +1,4 @@ -ExportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportMode

pub enum ExportMode {
+ExportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportMode

source ·
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§

§

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>( +

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

source§

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
§

impl PartialEq for ExportMode

§

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
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 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 Serialize for ExportMode

§

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

source§

impl Serialize for ExportMode

source§

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
§

impl Copy for ExportMode

§

impl Eq for ExportMode

§

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
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.ExportProgress.html b/pr/2656/docs/iroh/blobs/store/enum.ExportProgress.html index 51c1e3a2f6..006e993f04 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ExportProgress.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ExportProgress.html @@ -1,4 +1,4 @@ -ExportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportProgress

pub enum ExportProgress {
+ExportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ExportProgress

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.GcMarkEvent.html b/pr/2656/docs/iroh/blobs/store/enum.GcMarkEvent.html index 7ec8def147..adcb8bfc2c 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.GcMarkEvent.html +++ b/pr/2656/docs/iroh/blobs/store/enum.GcMarkEvent.html @@ -1,4 +1,4 @@ -GcMarkEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcMarkEvent

pub enum GcMarkEvent {
+GcMarkEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcMarkEvent

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.GcSweepEvent.html b/pr/2656/docs/iroh/blobs/store/enum.GcSweepEvent.html index d3397ff778..c42388308f 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.GcSweepEvent.html +++ b/pr/2656/docs/iroh/blobs/store/enum.GcSweepEvent.html @@ -1,4 +1,4 @@ -GcSweepEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcSweepEvent

pub enum GcSweepEvent {
+GcSweepEvent in iroh::blobs::store - Rust

Enum iroh::blobs::store::GcSweepEvent

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.ImportMode.html b/pr/2656/docs/iroh/blobs/store/enum.ImportMode.html index e275e0dc6f..a738fbd671 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ImportMode.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ImportMode.html @@ -1,4 +1,4 @@ -ImportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportMode

pub enum ImportMode {
+ImportMode in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportMode

source ·
pub enum ImportMode {
     Copy,
     TryReference,
 }
Expand description

The import mode describes how files will be imported.

@@ -14,16 +14,16 @@ 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§

§

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<'de> Deserialize<'de> for ImportMode

§

fn deserialize<__D>( +

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<'de> Deserialize<'de> for ImportMode

source§

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

Deserialize this value from the given Serde deserializer. 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 + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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 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 Serialize for ImportMode

§

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

source§

impl Serialize for ImportMode

source§

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
§

impl Copy for ImportMode

§

impl Eq for ImportMode

§

impl StructuralPartialEq for ImportMode

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 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.ImportProgress.html b/pr/2656/docs/iroh/blobs/store/enum.ImportProgress.html index 1197045a12..b5aaea7b40 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ImportProgress.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ImportProgress.html @@ -1,4 +1,4 @@ -ImportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportProgress

pub enum ImportProgress {
+ImportProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ImportProgress

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.ReportLevel.html b/pr/2656/docs/iroh/blobs/store/enum.ReportLevel.html index 6935e3ccf7..1018d3bfe5 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ReportLevel.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ReportLevel.html @@ -1,4 +1,4 @@ -ReportLevel in iroh::blobs::store - Rust

Enum iroh::blobs::store::ReportLevel

pub enum ReportLevel {
+ReportLevel in iroh::blobs::store - Rust

Enum iroh::blobs::store::ReportLevel

source ·
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§

§

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>( +

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

source§

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
§

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 + __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 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
§

impl PartialEq for ReportLevel

§

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

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 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 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 <= +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 <= 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
§

impl Serialize for ReportLevel

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for ReportLevel

source§

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
§

impl Copy for ReportLevel

§

impl Eq for ReportLevel

§

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
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/enum.ValidateProgress.html b/pr/2656/docs/iroh/blobs/store/enum.ValidateProgress.html index 1a0956ba7b..f1444e9d6f 100644 --- a/pr/2656/docs/iroh/blobs/store/enum.ValidateProgress.html +++ b/pr/2656/docs/iroh/blobs/store/enum.ValidateProgress.html @@ -1,4 +1,4 @@ -ValidateProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ValidateProgress

pub enum ValidateProgress {
+ValidateProgress in iroh::blobs::store - Rust

Enum iroh::blobs::store::ValidateProgress

source ·
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§

§

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>( +

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

source§

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
§

impl Serialize for ValidateProgress

§

fn serialize<__S>( + __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 as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/blobs/store/fs/index.html b/pr/2656/docs/iroh/blobs/store/fs/index.html index 4851e0e633..5c8246808d 100644 --- a/pr/2656/docs/iroh/blobs/store/fs/index.html +++ b/pr/2656/docs/iroh/blobs/store/fs/index.html @@ -1,4 +1,4 @@ -iroh::blobs::store::fs - Rust

Module iroh::blobs::store::fs

Expand description

redb backed storage

+iroh::blobs::store::fs - Rust

Module iroh::blobs::store::fs

source ·
Expand description

redb backed storage

Data can get into the store in two ways:

  1. import from local data
  2. diff --git a/pr/2656/docs/iroh/blobs/store/fs/struct.BatchOptions.html b/pr/2656/docs/iroh/blobs/store/fs/struct.BatchOptions.html index 4fd501a41c..1dfc5759b0 100644 --- a/pr/2656/docs/iroh/blobs/store/fs/struct.BatchOptions.html +++ b/pr/2656/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

    pub struct BatchOptions {
    +BatchOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::BatchOptions

    source ·
    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§

    §

    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 +

    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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/fs/struct.InlineOptions.html b/pr/2656/docs/iroh/blobs/store/fs/struct.InlineOptions.html index eac9a6b1fe..32ed15595b 100644 --- a/pr/2656/docs/iroh/blobs/store/fs/struct.InlineOptions.html +++ b/pr/2656/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

    pub struct InlineOptions {
    +InlineOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::InlineOptions

    source ·
    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§

    §

    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 +

    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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/fs/struct.Options.html b/pr/2656/docs/iroh/blobs/store/fs/struct.Options.html index 947d35d542..1b3ba47ba2 100644 --- a/pr/2656/docs/iroh/blobs/store/fs/struct.Options.html +++ b/pr/2656/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

    pub struct Options {
    +Options in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::Options

    source ·
    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§

    §

    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 +

    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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/fs/struct.PathOptions.html b/pr/2656/docs/iroh/blobs/store/fs/struct.PathOptions.html index b5b2ab1f59..38168e0584 100644 --- a/pr/2656/docs/iroh/blobs/store/fs/struct.PathOptions.html +++ b/pr/2656/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

    pub struct PathOptions {
    +PathOptions in iroh::blobs::store::fs - Rust

    Struct iroh::blobs::store::fs::PathOptions

    source ·
    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§

    §

    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 +

    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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/fs/struct.Store.html b/pr/2656/docs/iroh/blobs/store/fs/struct.Store.html index 7eaebd4fd5..8882be7a46 100644 --- a/pr/2656/docs/iroh/blobs/store/fs/struct.Store.html +++ b/pr/2656/docs/iroh/blobs/store/fs/struct.Store.html @@ -1,77 +1,77 @@ -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 +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 large files.

    -

    Implementations§

    §

    impl Store

    pub async fn transform_entries( +

    Implementations§

    source§

    impl Store

    source

    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.

    -

    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( +

    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( &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.

    -

    pub async fn dump(&self) -> Result<(), Error>

    Dump the entire content of the database to stdout.

    -

    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( +

    source

    pub async fn dump(&self) -> Result<(), Error>

    Dump the entire content of the database to stdout.

    +

    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( &self, hash: Hash, _size: u64 -) -> 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( +) -> 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( &self, hash: &Hash -) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    §

    async fn insert_complete( +) -> Result<Option<<Store as MapMut>::EntryMut>, Error>

    Get an existing entry as an EntryMut. Read more
    source§

    async fn insert_complete( &self, entry: <Store as MapMut>::EntryMut -) -> 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( +) -> 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( &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.
    §

    async fn partial_blobs( +been imported, and hash sequences that have been created internally.

    source§

    async fn partial_blobs( &self -) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    §

    async fn tags( +) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    source§

    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
    §

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    §

    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
    source§

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    source§

    async fn consistency_check( &self, repair: bool, tx: BoxedProgressSender<ConsistencyCheckProgress> -) -> Result<(), Error>

    Perform a consistency check on the database
    §

    async fn export( +) -> Result<(), Error>

    Perform a consistency check on the database
    source§

    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
    §

    impl Store for Store

    §

    async fn import_file( +) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    source§

    impl Store for Store

    source§

    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
    §

    async fn import_bytes( +) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    source§

    async fn import_bytes( &self, data: Bytes, format: BlobFormat -) -> Result<TempTag, Error>

    Import data from memory. Read more
    §

    async fn import_stream( +) -> Result<TempTag, Error>

    Import data from memory. Read more
    source§

    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.
    §

    async fn set_tag( +) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    source§

    async fn set_tag( &self, name: Tag, hash: Option<HashAndFormat> -) -> 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_run<G, Gut>(&self, config: GcConfig, protected_cb: G)
    where +) -> 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_run<G, Gut>(&self, config: GcConfig, protected_cb: G)
    where G: Fn() -> Gut, - Gut: Future<Output = BTreeSet<Hash>> + Send,

    Start the GC loop Read more
    §

    fn temp_tag(&self, value: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    §

    async fn sync(&self) -> Result<(), Error>

    Sync the store.
    §

    async fn shutdown(&self)

    Shutdown the store.
    §

    fn import_reader( + Gut: Future<Output = BTreeSet<Hash>> + Send,

    Start the GC loop Read more
    source§

    fn temp_tag(&self, value: HashAndFormat) -> TempTag

    Create a temporary pin for this store
    source§

    async fn sync(&self) -> Result<(), Error>

    Sync the store.
    source§

    async fn shutdown(&self)

    Shutdown the store.
    source§

    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.
    §

    fn validate( +) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    source§

    fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> diff --git a/pr/2656/docs/iroh/blobs/store/fs/type.Entry.html b/pr/2656/docs/iroh/blobs/store/fs/type.Entry.html index b807b54d0e..14b27bb14f 100644 --- a/pr/2656/docs/iroh/blobs/store/fs/type.Entry.html +++ b/pr/2656/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

    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

    source ·
    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/2656/docs/iroh/blobs/store/index.html b/pr/2656/docs/iroh/blobs/store/index.html index 0f696afb91..50c7b05908 100644 --- a/pr/2656/docs/iroh/blobs/store/index.html +++ b/pr/2656/docs/iroh/blobs/store/index.html @@ -1,3 +1,3 @@ -iroh::blobs::store - Rust

    Module iroh::blobs::store

    Expand description

    Implementations of blob stores

    +iroh::blobs::store - Rust

    Module iroh::blobs::store

    source ·
    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.

    Structs§

    • Configuration for the GC mark and sweep.

    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/2656/docs/iroh/blobs/store/mem/index.html b/pr/2656/docs/iroh/blobs/store/mem/index.html index 4be9f4a89b..a93bedc0a2 100644 --- a/pr/2656/docs/iroh/blobs/store/mem/index.html +++ b/pr/2656/docs/iroh/blobs/store/mem/index.html @@ -1,4 +1,4 @@ -iroh::blobs::store::mem - Rust

    Module iroh::blobs::store::mem

    Expand description

    A full in memory database for iroh-blobs

    +iroh::blobs::store::mem - Rust

    Module iroh::blobs::store::mem

    source ·
    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/2656/docs/iroh/blobs/store/mem/struct.Entry.html b/pr/2656/docs/iroh/blobs/store/mem/struct.Entry.html index dd2829dff0..41a3061451 100644 --- a/pr/2656/docs/iroh/blobs/store/mem/struct.Entry.html +++ b/pr/2656/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

    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 +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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/mem/struct.Store.html b/pr/2656/docs/iroh/blobs/store/mem/struct.Store.html index 09cc1ec679..f7b781fa68 100644 --- a/pr/2656/docs/iroh/blobs/store/mem/struct.Store.html +++ b/pr/2656/docs/iroh/blobs/store/mem/struct.Store.html @@ -1,54 +1,54 @@ -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 +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 partial blobs.

    -

    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( +

    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( &self, hash: &Hash -) -> 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( +) -> 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( &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.
    §

    async fn partial_blobs( +been imported, and hash sequences that have been created internally.

    source§

    async fn partial_blobs( &self -) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    §

    async fn tags( +) -> Result<Box<dyn Iterator<Item = Result<Hash, Error>> + Send + Sync>, Error>

    list partial blobs in the database
    source§

    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
    §

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    §

    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
    source§

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    source§

    async fn consistency_check( &self, _repair: bool, _tx: BoxedProgressSender<ConsistencyCheckProgress> -) -> Result<(), Error>

    Perform a consistency check on the database
    §

    async fn export( +) -> Result<(), Error>

    Perform a consistency check on the database
    source§

    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
    §

    impl Store for Store

    §

    async fn import_file( +) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    source§

    impl Store for Store

    source§

    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
    §

    async fn import_stream( +) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    source§

    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.
    §

    async fn import_bytes( +) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    source§

    async fn import_bytes( &self, bytes: Bytes, format: BlobFormat -) -> Result<TempTag, Error>

    Import data from memory. Read more
    §

    async fn set_tag( +) -> Result<TempTag, Error>

    Import data from memory. Read more
    source§

    async fn set_tag( &self, name: Tag, value: Option<HashAndFormat> -) -> 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_run<G, Gut>(&self, config: GcConfig, protected_cb: G)
    where +) -> 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_run<G, Gut>(&self, config: GcConfig, protected_cb: G)
    where G: Fn() -> Gut, - Gut: Future<Output = BTreeSet<Hash>> + Send,

    Start the GC loop 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.
    §

    async fn sync(&self) -> Result<(), Error>

    Sync the store.
    §

    fn import_reader( + Gut: Future<Output = BTreeSet<Hash>> + Send,

    Start the GC loop 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§

    async fn sync(&self) -> Result<(), Error>

    Sync the store.
    source§

    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.
    §

    fn validate( +) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    source§

    fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> diff --git a/pr/2656/docs/iroh/blobs/store/readonly_mem/index.html b/pr/2656/docs/iroh/blobs/store/readonly_mem/index.html index 92be319d4a..977f604042 100644 --- a/pr/2656/docs/iroh/blobs/store/readonly_mem/index.html +++ b/pr/2656/docs/iroh/blobs/store/readonly_mem/index.html @@ -1,3 +1,3 @@ -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.

    +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.

    Main entry point is Store.

    Structs§

    \ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/store/readonly_mem/struct.Entry.html b/pr/2656/docs/iroh/blobs/store/readonly_mem/struct.Entry.html index c7db951c1a..e9c1987841 100644 --- a/pr/2656/docs/iroh/blobs/store/readonly_mem/struct.Entry.html +++ b/pr/2656/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

    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 +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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/readonly_mem/struct.Store.html b/pr/2656/docs/iroh/blobs/store/readonly_mem/struct.Store.html index 473bf3212d..96e1de3c1a 100644 --- a/pr/2656/docs/iroh/blobs/store/readonly_mem/struct.Store.html +++ b/pr/2656/docs/iroh/blobs/store/readonly_mem/struct.Store.html @@ -1,71 +1,71 @@ -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.

    +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.

    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§

    §

    impl Store

    pub fn new( +

    Implementations§

    source§

    impl Store

    source

    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.

    -

    pub fn insert(&mut self, data: impl AsRef<[u8]>) -> Hash

    Insert a new entry into the database, and return the hash of the entry.

    +
    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.

    If the database was shared before, this will make a copy.

    -

    pub fn insert_many( +

    source

    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.

    -

    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 +

    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 K: Into<String>, - 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( + 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( &self, hash: &Hash -) -> 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( +) -> 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( &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.
    §

    async fn tags( +been imported, and hash sequences that have been created internally.

    source§

    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
    §

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    §

    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
    source§

    fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

    Temp tags
    source§

    async fn consistency_check( &self, _repair: bool, _tx: BoxedProgressSender<ConsistencyCheckProgress> -) -> Result<(), Error>

    Perform a consistency check on the database
    §

    async fn export( +) -> Result<(), Error>

    Perform a consistency check on the database
    source§

    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
    §

    async fn partial_blobs( +) -> Result<(), Error>

    This trait method extracts a file to a local path. Read more
    source§

    async fn partial_blobs( &self -) -> 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( +) -> 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( &self, bytes: Bytes, format: BlobFormat ) -> Result<TempTag, Error>

    import a byte slice

    -
    §

    async fn import_file( +

    source§

    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
    §

    async fn import_stream( +) -> Result<(TempTag, u64), Error>

    This trait method imports a file from a local path. Read more
    source§

    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.
    §

    async fn set_tag( +) -> Result<(TempTag, u64), Error>

    Import data from a stream of bytes.
    source§

    async fn set_tag( &self, _name: Tag, _hash: Option<HashAndFormat> -) -> 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_run<G, Gut>(&self, config: GcConfig, protected_cb: G)
    where +) -> 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_run<G, Gut>(&self, config: GcConfig, protected_cb: G)
    where G: Fn() -> Gut, - Gut: Future<Output = BTreeSet<Hash>> + Send,

    Start the GC loop 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.
    §

    async fn sync(&self) -> Result<(), Error>

    Sync the store.
    §

    fn import_reader( + Gut: Future<Output = BTreeSet<Hash>> + Send,

    Start the GC loop 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§

    async fn sync(&self) -> Result<(), Error>

    Sync the store.
    source§

    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.
    §

    fn validate( +) -> impl Future<Output = Result<(TempTag, u64), Error>> + Send

    Import data from an async byte reader.
    source§

    fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> diff --git a/pr/2656/docs/iroh/blobs/store/struct.GcConfig.html b/pr/2656/docs/iroh/blobs/store/struct.GcConfig.html index 936101f5e4..b79345a72e 100644 --- a/pr/2656/docs/iroh/blobs/store/struct.GcConfig.html +++ b/pr/2656/docs/iroh/blobs/store/struct.GcConfig.html @@ -1,10 +1,10 @@ -GcConfig in iroh::blobs::store - Rust

    Struct iroh::blobs::store::GcConfig

    pub struct GcConfig {
    +GcConfig in iroh::blobs::store - Rust

    Struct iroh::blobs::store::GcConfig

    source ·
    pub struct GcConfig {
         pub period: Duration,
         pub done_callback: Option<Box<dyn Fn() + Send>>,
     }
    Expand description

    Configuration for the GC mark and sweep.

    Fields§

    §period: Duration

    The period at which to execute the GC.

    §done_callback: Option<Box<dyn Fn() + Send>>

    An optional callback called every time a GC round finishes.

    -

    Trait Implementations§

    §

    impl Debug for GcConfig

    §

    fn fmt(&self, __derive_more_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§

    source§

    impl Debug for GcConfig

    source§

    fn fmt(&self, __derive_more_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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh/blobs/store/trait.BaoBatchWriter.html b/pr/2656/docs/iroh/blobs/store/trait.BaoBatchWriter.html index 7a590bbd15..16fe8402be 100644 --- a/pr/2656/docs/iroh/blobs/store/trait.BaoBatchWriter.html +++ b/pr/2656/docs/iroh/blobs/store/trait.BaoBatchWriter.html @@ -1,4 +1,4 @@ -BaoBatchWriter in iroh::blobs::store - Rust

    Trait iroh::blobs::store::BaoBatchWriter

    pub trait BaoBatchWriter {
    +BaoBatchWriter in iroh::blobs::store - Rust

    Trait iroh::blobs::store::BaoBatchWriter

    source ·
    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§

    source

    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.

    -

    fn sync(&mut self) -> impl Future<Output = Result<(), Error>>

    Sync the written data to permanent storage, if applicable. +

    source

    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§

    §

    impl<W> BaoBatchWriter for &mut W
    where +

    Object Safety§

    This trait is not object safe.

    Implementations on Foreign Types§

    source§

    impl<W> BaoBatchWriter for &mut W
    where W: BaoBatchWriter,

    Implement BaoBatchWriter for mutable references

    -
    §

    async fn write_batch( +

    source§

    async fn write_batch( &mut self, size: u64, batch: Vec<BaoContentItem> -) -> Result<(), Error>

    §

    async fn sync(&mut self) -> Result<(), Error>

    Implementors§

    \ No newline at end of file +) -> Result<(), Error>

    source§

    async fn sync(&mut self) -> Result<(), Error>

    Implementors§

    \ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/store/trait.Map.html b/pr/2656/docs/iroh/blobs/store/trait.Map.html index 039426d828..2ffbb23ead 100644 --- a/pr/2656/docs/iroh/blobs/store/trait.Map.html +++ b/pr/2656/docs/iroh/blobs/store/trait.Map.html @@ -1,4 +1,4 @@ -Map in iroh::blobs::store - Rust

    Trait iroh::blobs::store::Map

    pub trait Map: Clone + Send + Sync + 'static {
    +Map in iroh::blobs::store - Rust

    Trait iroh::blobs::store::Map

    source ·
    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§

    type Entry: MapEntry

    The entry type. An entry is a cheaply cloneable handle that can be used +

    Required Associated Types§

    source

    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§

    fn get( +

    Required Methods§

    source

    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§

    §

    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 +

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 diff --git a/pr/2656/docs/iroh/blobs/store/trait.MapEntry.html b/pr/2656/docs/iroh/blobs/store/trait.MapEntry.html index 6603c24fa6..6a49a44f40 100644 --- a/pr/2656/docs/iroh/blobs/store/trait.MapEntry.html +++ b/pr/2656/docs/iroh/blobs/store/trait.MapEntry.html @@ -1,4 +1,4 @@ -MapEntry in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapEntry

pub trait MapEntry: Debug + Clone + Send + Sync + 'static {
+MapEntry in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapEntry

source ·
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§

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.

+

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.

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.

-

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( +

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( &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§

§

impl MapEntry for iroh::blobs::store::mem::Entry

§

impl MapEntry for iroh::blobs::store::readonly_mem::Entry

\ No newline at end of file +

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 diff --git a/pr/2656/docs/iroh/blobs/store/trait.MapEntryMut.html b/pr/2656/docs/iroh/blobs/store/trait.MapEntryMut.html index 76c5077927..d510d9fb2c 100644 --- a/pr/2656/docs/iroh/blobs/store/trait.MapEntryMut.html +++ b/pr/2656/docs/iroh/blobs/store/trait.MapEntryMut.html @@ -1,10 +1,10 @@ -MapEntryMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapEntryMut

pub trait MapEntryMut: MapEntry {
+MapEntryMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapEntryMut

source ·
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§

source

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§

§

impl MapEntryMut for iroh::blobs::store::mem::Entry

§

impl MapEntryMut for iroh::blobs::store::readonly_mem::Entry

\ No newline at end of file +

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 diff --git a/pr/2656/docs/iroh/blobs/store/trait.MapMut.html b/pr/2656/docs/iroh/blobs/store/trait.MapMut.html index 0833167d14..ea0c97ae30 100644 --- a/pr/2656/docs/iroh/blobs/store/trait.MapMut.html +++ b/pr/2656/docs/iroh/blobs/store/trait.MapMut.html @@ -1,4 +1,4 @@ -MapMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapMut

pub trait MapMut: Map {
+MapMut in iroh::blobs::store - Rust

Trait iroh::blobs::store::MapMut

source ·
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§

type EntryMut: MapEntryMut

An entry that is possibly writable

-

Required Methods§

fn get_mut( +

Required Associated Types§

source

type EntryMut: MapEntryMut

An entry that is possibly writable

+

Required Methods§

source

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.

-

fn get_or_create( +

source

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.

-

fn entry_status( +

source

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.

-

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.

+
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.

Don’t count on this to be efficient.

-

fn insert_complete( +

source

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§

§

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 +

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 diff --git a/pr/2656/docs/iroh/blobs/store/trait.ReadableStore.html b/pr/2656/docs/iroh/blobs/store/trait.ReadableStore.html index 2ccffc43d5..0b739237ff 100644 --- a/pr/2656/docs/iroh/blobs/store/trait.ReadableStore.html +++ b/pr/2656/docs/iroh/blobs/store/trait.ReadableStore.html @@ -1,4 +1,4 @@ -ReadableStore in iroh::blobs::store - Rust

Trait iroh::blobs::store::ReadableStore

pub trait ReadableStore: Map {
+ReadableStore in iroh::blobs::store - Rust

Trait iroh::blobs::store::ReadableStore

source ·
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§

fn blobs( +

Required Methods§

source

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.

-

fn tags( +

source

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

-

fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

Temp tags

-

fn consistency_check( +

source

fn temp_tags(&self) -> Box<dyn Iterator<Item = HashAndFormat> + Send + Sync>

Temp tags

+
source

fn consistency_check( &self, repair: bool, tx: BoxedProgressSender<ConsistencyCheckProgress> ) -> impl Future<Output = Result<(), Error>> + Send

Perform a consistency check on the database

-

fn partial_blobs( +

source

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

-

fn export( +

source

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§

§

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 +

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 diff --git a/pr/2656/docs/iroh/blobs/store/trait.Store.html b/pr/2656/docs/iroh/blobs/store/trait.Store.html index d1504eb5db..c304c753f7 100644 --- a/pr/2656/docs/iroh/blobs/store/trait.Store.html +++ b/pr/2656/docs/iroh/blobs/store/trait.Store.html @@ -1,4 +1,4 @@ -Store in iroh::blobs::store - Rust

Trait iroh::blobs::store::Store

pub trait Store: ReadableStore + MapMut + Debug {
+Store in iroh::blobs::store - Rust

Trait iroh::blobs::store::Store

source ·
pub trait Store: ReadableStore + MapMut + Debug {
     // Required methods
     fn import_file(
         &self,
@@ -55,7 +55,7 @@
         tx: BoxedProgressSender<ValidateProgress>
     ) -> impl Future<Output = Result<(), Error>> + Send { ... }
 }
Expand description

The mutable part of a Bao store.

-

Required Methods§

Required Methods§

source

fn import_file( &self, data: PathBuf, mode: ImportMode, @@ -70,29 +70,29 @@ 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.

-

fn import_bytes( +

source

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.

-

fn import_stream( +

source

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.

-

fn set_tag( +

source

fn set_tag( &self, name: Tag, hash: Option<HashAndFormat> ) -> impl Future<Output = Result<(), Error>> + Send

Set a tag

-

fn create_tag( +

source

fn create_tag( &self, hash: HashAndFormat ) -> impl Future<Output = Result<Tag, Error>> + Send

Create a new tag

-

fn temp_tag(&self, value: HashAndFormat) -> TempTag

Create a temporary pin for this store

-

fn gc_run<G, Gut>( +

source

fn temp_tag(&self, value: HashAndFormat) -> TempTag

Create a temporary pin for this store

+
source

fn gc_run<G, Gut>( &self, config: GcConfig, protected_cb: G @@ -100,19 +100,19 @@ G: Fn() -> Gut, Gut: Future<Output = BTreeSet<Hash>> + Send,

Start the GC loop

The gc task will shut down, when dropping the returned future.

-

fn delete( +

source

fn delete( &self, hashes: Vec<Hash> ) -> impl Future<Output = Result<(), Error>> + Send

physically delete the given hashes from the store.

-

fn shutdown(&self) -> impl Future<Output = ()> + Send

Shutdown the store.

-

fn sync(&self) -> impl Future<Output = Result<(), Error>> + Send

Sync the store.

-

Provided Methods§

source

fn shutdown(&self) -> impl Future<Output = ()> + Send

Shutdown the store.

+
source

fn sync(&self) -> impl Future<Output = Result<(), Error>> + Send

Sync the store.

+

Provided Methods§

source

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.

-

fn validate( +

source

fn validate( &self, repair: bool, tx: BoxedProgressSender<ValidateProgress> @@ -120,4 +120,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§

§

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 +

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 diff --git a/pr/2656/docs/iroh/blobs/store/type.DbIter.html b/pr/2656/docs/iroh/blobs/store/type.DbIter.html index 60f49224b2..cd42d3f83c 100644 --- a/pr/2656/docs/iroh/blobs/store/type.DbIter.html +++ b/pr/2656/docs/iroh/blobs/store/type.DbIter.html @@ -1,2 +1,2 @@ -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.

+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.

Aliased Type§

struct DbIter<T>(/* private fields */);
\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/store/type.ExportProgressCb.html b/pr/2656/docs/iroh/blobs/store/type.ExportProgressCb.html index 50f94ca150..e5331a0bc9 100644 --- a/pr/2656/docs/iroh/blobs/store/type.ExportProgressCb.html +++ b/pr/2656/docs/iroh/blobs/store/type.ExportProgressCb.html @@ -1,2 +1,2 @@ -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

+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

Aliased Type§

struct ExportProgressCb(/* private fields */);
\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/struct.Hash.html b/pr/2656/docs/iroh/blobs/struct.Hash.html index 2063766b6a..ccee863a09 100644 --- a/pr/2656/docs/iroh/blobs/struct.Hash.html +++ b/pr/2656/docs/iroh/blobs/struct.Hash.html @@ -1,37 +1,37 @@ -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 +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 representation of the 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>( +

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

source§

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
§

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 + 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 __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 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,

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,

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
§

impl PartialEq for Hash

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for Hash

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for Hash

source§

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
§

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 + 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 Hash: 'a,

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

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

source§

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
§

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 + 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 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 @@ -159,7 +159,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>,

§

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

source§

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/2656/docs/iroh/blobs/struct.HashAndFormat.html b/pr/2656/docs/iroh/blobs/struct.HashAndFormat.html index edab4653b9..92027e9b9d 100644 --- a/pr/2656/docs/iroh/blobs/struct.HashAndFormat.html +++ b/pr/2656/docs/iroh/blobs/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh::blobs - Rust

Struct iroh::blobs::HashAndFormat

pub struct HashAndFormat {
+HashAndFormat in iroh::blobs - Rust

Struct iroh::blobs::HashAndFormat

source ·
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§

§

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>( +

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

source§

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
§

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 + 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 __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 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,

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,

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
§

impl PartialEq for HashAndFormat

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for HashAndFormat

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for HashAndFormat

source§

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
§

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 + 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 HashAndFormat: 'a,

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

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

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -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>,

§

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

source§

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/2656/docs/iroh/blobs/struct.Tag.html b/pr/2656/docs/iroh/blobs/struct.Tag.html index 87ccb0079d..1bbe81c812 100644 --- a/pr/2656/docs/iroh/blobs/struct.Tag.html +++ b/pr/2656/docs/iroh/blobs/struct.Tag.html @@ -1,32 +1,32 @@ -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>( +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>( __deserializer: __D ) -> Result<Tag, <__D as Deserializer<'de>>::Error>
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 + __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 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
§

impl PartialEq for Tag

§

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
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 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 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 <= +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 <= 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
§

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 +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 Tag: 'a,

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

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

source§

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
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Serialize for Tag

§

fn serialize<__S>( + 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>( &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
§

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 + __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 Tag: 'a,

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

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

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/struct.TempTag.html b/pr/2656/docs/iroh/blobs/struct.TempTag.html index 0c3431c94d..2b061c8427 100644 --- a/pr/2656/docs/iroh/blobs/struct.TempTag.html +++ b/pr/2656/docs/iroh/blobs/struct.TempTag.html @@ -1,17 +1,17 @@ -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.

+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.

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§

§

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

+

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

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.

-

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 hash_and_format(&self) -> HashAndFormat

The hash and 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 +

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 hash_and_format(&self) -> HashAndFormat

The hash and 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/enum.MemOrFile.html b/pr/2656/docs/iroh/blobs/util/enum.MemOrFile.html index 47698863ec..322949ea7f 100644 --- a/pr/2656/docs/iroh/blobs/util/enum.MemOrFile.html +++ b/pr/2656/docs/iroh/blobs/util/enum.MemOrFile.html @@ -1,4 +1,4 @@ -MemOrFile in iroh::blobs::util - Rust

Enum iroh::blobs::util::MemOrFile

pub enum MemOrFile<M, F> {
+MemOrFile in iroh::blobs::util - Rust

Enum iroh::blobs::util::MemOrFile

source ·
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§

§

impl<M, F> MemOrFile<M, (F, u64)>
where +

Implementations§

source§

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.

-

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>( +

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>( self, f: impl FnOnce(F) -> Result<F2, E> ) -> Result<MemOrFile<M, F2>, E>

Try to map the file part of this MemOrFile

-

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 +

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 M: Debug, - 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 + 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 M: Freeze, F: Freeze,

§

impl<M, F> RefUnwindSafe for MemOrFile<M, F>
where M: RefUnwindSafe, diff --git a/pr/2656/docs/iroh/blobs/util/enum.SetTagOption.html b/pr/2656/docs/iroh/blobs/util/enum.SetTagOption.html index d218db2760..97f3810dd7 100644 --- a/pr/2656/docs/iroh/blobs/util/enum.SetTagOption.html +++ b/pr/2656/docs/iroh/blobs/util/enum.SetTagOption.html @@ -1,24 +1,24 @@ -SetTagOption in iroh::blobs::util - Rust

Enum iroh::blobs::util::SetTagOption

pub enum SetTagOption {
+SetTagOption in iroh::blobs::util - Rust

Enum iroh::blobs::util::SetTagOption

source ·
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§

§

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>( +

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

source§

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
§

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 + __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 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
§

impl PartialEq for SetTagOption

§

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

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 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 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 <= +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 <= 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
§

impl Serialize for SetTagOption

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for SetTagOption

source§

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
§

impl Eq for SetTagOption

§

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
source§

impl Eq for SetTagOption

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/fn.total_bytes.html b/pr/2656/docs/iroh/blobs/util/fn.total_bytes.html index 784ba21751..31a7fe3c73 100644 --- a/pr/2656/docs/iroh/blobs/util/fn.total_bytes.html +++ b/pr/2656/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

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

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.

If some ranges are out of bounds, they will be clamped to the size.

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/util/index.html b/pr/2656/docs/iroh/blobs/util/index.html index 1cd61144d0..240e920cd7 100644 --- a/pr/2656/docs/iroh/blobs/util/index.html +++ b/pr/2656/docs/iroh/blobs/util/index.html @@ -1,4 +1,4 @@ -iroh::blobs::util - Rust

Module iroh::blobs::util

Expand description

Utility functions and types.

+iroh::blobs::util - Rust

Module iroh::blobs::util

source ·
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§

source§

impl<W> Debug for TrackingWriter<W>
where + W: Debug,

source§

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/2656/docs/iroh/blobs/util/local_pool/enum.PanicMode.html b/pr/2656/docs/iroh/blobs/util/local_pool/enum.PanicMode.html index 5c687d8637..39a90dddcd 100644 --- a/pr/2656/docs/iroh/blobs/util/local_pool/enum.PanicMode.html +++ b/pr/2656/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

pub enum PanicMode {
+PanicMode in iroh::blobs::util::local_pool - Rust

Enum iroh::blobs::util::local_pool::PanicMode

source ·
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§

§

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 +

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 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 PanicMode

§

impl Eq for PanicMode

§

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.

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/local_pool/enum.SpawnError.html b/pr/2656/docs/iroh/blobs/util/local_pool/enum.SpawnError.html index d27d9f6339..501cc2cc43 100644 --- a/pr/2656/docs/iroh/blobs/util/local_pool/enum.SpawnError.html +++ b/pr/2656/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

pub enum SpawnError {
+SpawnError in iroh::blobs::util::local_pool - Rust

Enum iroh::blobs::util::local_pool::SpawnError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/local_pool/index.html b/pr/2656/docs/iroh/blobs/util/local_pool/index.html index ed4ea80069..a7a74af920 100644 --- a/pr/2656/docs/iroh/blobs/util/local_pool/index.html +++ b/pr/2656/docs/iroh/blobs/util/local_pool/index.html @@ -1,2 +1,2 @@ -iroh::blobs::util::local_pool - Rust

Module iroh::blobs::util::local_pool

Expand description

A local task pool with proper shutdown

+iroh::blobs::util::local_pool - Rust

Module iroh::blobs::util::local_pool

source ·
Expand description

A local task pool with proper shutdown

Structs§

Enums§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/util/local_pool/struct.Config.html b/pr/2656/docs/iroh/blobs/util/local_pool/struct.Config.html index 167a36f8d2..d59b27ccac 100644 --- a/pr/2656/docs/iroh/blobs/util/local_pool/struct.Config.html +++ b/pr/2656/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

pub struct Config {
+Config in iroh::blobs::util::local_pool - Rust

Struct iroh::blobs::util::local_pool::Config

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/local_pool/struct.LocalPool.html b/pr/2656/docs/iroh/blobs/util/local_pool/struct.LocalPool.html index 802d011752..6bd3a9b564 100644 --- a/pr/2656/docs/iroh/blobs/util/local_pool/struct.LocalPool.html +++ b/pr/2656/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

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

source ·
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 @@ -13,58 +13,58 @@ run to completion.

The pool will install the [tracing::Subscriber] which was set on the current thread of where it was created as the default subscriber in all spawned threads.

-

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.

+

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.

This will use the current tokio runtime handle, so it must be called from within a tokio runtime.

-

pub fn handle(&self) -> &LocalPoolHandle

Get a cheaply cloneable handle to the pool

+
source

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.

-

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.

+
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.

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.

-

pub async fn finish(self)

Gently shut down the pool

+
source

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>§

pub fn waiting_tasks(&self) -> usize

Get the number of tasks in the queue

+

Methods from Deref<Target = LocalPoolHandle>§

source

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.

-

pub fn try_spawn<T, F, Fut>(&self, gen: F) -> Result<Run<T>, SpawnError>
where +

source

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.

-

pub fn try_spawn_detached<F, Fut>(&self, gen: F) -> Result<(), SpawnError>
where +

source

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.

-

pub fn spawn<T, F, Fut>(&self, gen: F) -> Run<T>
where +

source

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.

-

pub fn spawn_detached<F, Fut>(&self, gen: F)
where +

source

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.

-

pub fn try_spawn_detached_boxed( +

source

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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/local_pool/struct.LocalPoolHandle.html b/pr/2656/docs/iroh/blobs/util/local_pool/struct.LocalPoolHandle.html index 28b4d6f953..1b0afc8d79 100644 --- a/pr/2656/docs/iroh/blobs/util/local_pool/struct.LocalPoolHandle.html +++ b/pr/2656/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

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

+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

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.

-

pub fn try_spawn<T, F, Fut>(&self, gen: F) -> Result<Run<T>, SpawnError>
where +

source

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.

-

pub fn try_spawn_detached<F, Fut>(&self, gen: F) -> Result<(), SpawnError>
where +

source

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.

-

pub fn spawn<T, F, Fut>(&self, gen: F) -> Run<T>
where +

source

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.

-

pub fn spawn_detached<F, Fut>(&self, gen: F)
where +

source

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.

-

pub fn try_spawn_detached_boxed( +

source

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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/local_pool/struct.Run.html b/pr/2656/docs/iroh/blobs/util/local_pool/struct.Run.html index bdf1fee902..240921aa74 100644 --- a/pr/2656/docs/iroh/blobs/util/local_pool/struct.Run.html +++ b/pr/2656/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

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

source ·
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§

§

impl<T> Run<T>

pub fn abort(&mut self)

Abort the task

+

Implementations§

source§

impl<T> Run<T>

source

pub fn abort(&mut self)

Abort the task

Dropping the future will also abort the task.

-

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( +

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( 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/2656/docs/iroh/blobs/util/progress/enum.ProgressSendError.html b/pr/2656/docs/iroh/blobs/util/progress/enum.ProgressSendError.html index 033ffae92f..8a6627f53a 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/enum.ProgressSendError.html +++ b/pr/2656/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

pub enum ProgressSendError {
+ProgressSendError in iroh::blobs::util::progress - Rust

Enum iroh::blobs::util::progress::ProgressSendError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/progress/index.html b/pr/2656/docs/iroh/blobs/util/progress/index.html index 3d30e8a01c..d4dc51fd0c 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/index.html +++ b/pr/2656/docs/iroh/blobs/util/progress/index.html @@ -1,4 +1,4 @@ -iroh::blobs::util::progress - Rust

Module iroh::blobs::util::progress

Expand description

Utilities for reporting progress.

+iroh::blobs::util::progress - Rust

Module iroh::blobs::util::progress

source ·
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/2656/docs/iroh/blobs/util/progress/struct.AsyncChannelProgressSender.html b/pr/2656/docs/iroh/blobs/util/progress/struct.AsyncChannelProgressSender.html index edb50aaf5e..525b627d19 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/struct.AsyncChannelProgressSender.html +++ b/pr/2656/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

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( +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( &self, msg: <AsyncChannelProgressSender<T> as ProgressSender>::Msg -) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
§

fn try_send( +) -> Result<(), ProgressSendError>

Send a message and wait if the receiver is full. Read more
source§

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
§

fn blocking_send( +) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full. Read more
source§

fn blocking_send( &self, msg: <AsyncChannelProgressSender<T> as ProgressSender>::Msg -) -> 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>

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 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.
§

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.
source§

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.
§

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.
source§

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/2656/docs/iroh/blobs/util/progress/struct.BoxedProgressSender.html b/pr/2656/docs/iroh/blobs/util/progress/struct.BoxedProgressSender.html index 10e2f11bdc..bf98ea69a0 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/struct.BoxedProgressSender.html +++ b/pr/2656/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

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 +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 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.
§

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.
source§

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.
§

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.
source§

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> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2656/docs/iroh/blobs/util/progress/struct.FallibleProgressSliceWriter.html b/pr/2656/docs/iroh/blobs/util/progress/struct.FallibleProgressSliceWriter.html index acf11d5298..2854d9c971 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/struct.FallibleProgressSliceWriter.html +++ b/pr/2656/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

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

source ·
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§

§

impl<W, F> FallibleProgressSliceWriter<W, F>
where +

Implementations§

source§

impl<W, F> FallibleProgressSliceWriter<W, F>
where W: AsyncSliceWriter, - 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

+ 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

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.

-

pub fn into_inner(self) -> W

Return the inner writer.

-

Trait Implementations§

§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where +

source

pub fn into_inner(self) -> W

Return the inner writer.

+

Trait Implementations§

source§

impl<W, F> AsyncSliceWriter for FallibleProgressSliceWriter<W, F>
where W: AsyncSliceWriter + 'static, - F: Fn(u64, usize) -> Result<(), Error> + 'static,

§

async fn write_bytes_at( + F: Fn(u64, usize) -> Result<(), Error> + 'static,

source§

async fn write_bytes_at( &mut self, offset: u64, data: Bytes -) -> 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 +) -> 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 W: Debug, - 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 + 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 W: Freeze, F: Freeze,

§

impl<W, F> RefUnwindSafe for FallibleProgressSliceWriter<W, F>
where W: RefUnwindSafe, diff --git a/pr/2656/docs/iroh/blobs/util/progress/struct.IgnoreProgressSender.html b/pr/2656/docs/iroh/blobs/util/progress/struct.IgnoreProgressSender.html index de8bf7cef1..3486a8c2d3 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/struct.IgnoreProgressSender.html +++ b/pr/2656/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

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 +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 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.
§

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.
source§

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.
§

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.
source§

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/2656/docs/iroh/blobs/util/progress/struct.ProgressSliceWriter.html b/pr/2656/docs/iroh/blobs/util/progress/struct.ProgressSliceWriter.html index fa075d34c2..4f47f4a60e 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/struct.ProgressSliceWriter.html +++ b/pr/2656/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

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

source ·
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§

§

impl<W, F> ProgressSliceWriter<W, F>
where +

Implementations§

source§

impl<W, F> ProgressSliceWriter<W, F>
where W: AsyncSliceWriter, - 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

+ 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

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.

-

pub fn into_inner(self) -> W

Return the inner writer

-

Trait Implementations§

§

impl<W, F> AsyncSliceWriter for ProgressSliceWriter<W, F>
where +

source

pub fn into_inner(self) -> W

Return the inner writer

+

Trait Implementations§

source§

impl<W, F> AsyncSliceWriter for ProgressSliceWriter<W, F>
where W: AsyncSliceWriter + 'static, - F: FnMut(u64, usize) + 'static,

§

async fn write_bytes_at( + F: FnMut(u64, usize) + 'static,

source§

async fn write_bytes_at( &mut self, offset: u64, data: Bytes -) -> 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 +) -> 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 W: Debug, - 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 + 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 W: Freeze, F: Freeze,

§

impl<W, F> RefUnwindSafe for ProgressSliceWriter<W, F>
where W: RefUnwindSafe, diff --git a/pr/2656/docs/iroh/blobs/util/progress/struct.WithFilterMap.html b/pr/2656/docs/iroh/blobs/util/progress/struct.WithFilterMap.html index 281ddd70c1..e07449a026 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/struct.WithFilterMap.html +++ b/pr/2656/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

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

source ·
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§

§

impl<I, U, F> Clone for WithFilterMap<I, U, F>
where +

Trait Implementations§

source§

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,

§

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 + 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 I: ProgressSender, U: Send + Sync + 'static, - 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 + 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 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.
§

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 + 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 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.
§

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.
source§

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/2656/docs/iroh/blobs/util/progress/struct.WithMap.html b/pr/2656/docs/iroh/blobs/util/progress/struct.WithMap.html index ce4b33bc75..30034de2a5 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/struct.WithMap.html +++ b/pr/2656/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

pub struct WithMap<I, U, F>(/* private fields */)
+WithMap in iroh::blobs::util::progress - Rust

Struct iroh::blobs::util::progress::WithMap

source ·
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§

§

impl<I, U, F> Clone for WithMap<I, U, F>
where +

Trait Implementations§

source§

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,

§

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 + 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 I: ProgressSender, U: Send + Sync + 'static, - 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 + 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 I: IdGenerator + ProgressSender, U: Send + Sync + 'static, - 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 + 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 I: ProgressSender, U: Send + Sync + 'static, - 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 + 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 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.
§

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.
source§

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/2656/docs/iroh/blobs/util/progress/trait.IdGenerator.html b/pr/2656/docs/iroh/blobs/util/progress/trait.IdGenerator.html index 7c19babfda..68e76a1f10 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/trait.IdGenerator.html +++ b/pr/2656/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

pub trait IdGenerator {
+IdGenerator in iroh::blobs::util::progress - Rust

Trait iroh::blobs::util::progress::IdGenerator

source ·
pub trait IdGenerator {
     // Required method
     fn new_id(&self) -> u64;
 }
Expand description

An id generator, to be combined with a progress sender.

-

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 +

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 I: IdGenerator + ProgressSender, U: Send + Sync + 'static, - 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 IgnoreProgressSender<T>

\ No newline at end of file + 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 IgnoreProgressSender<T>

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/util/progress/trait.ProgressSender.html b/pr/2656/docs/iroh/blobs/util/progress/trait.ProgressSender.html index a4de103128..17dbdfbec2 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/trait.ProgressSender.html +++ b/pr/2656/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

pub trait ProgressSender: Debug + Clone + Send + Sync + 'static {
+ProgressSender in iroh::blobs::util::progress - Rust

Trait iroh::blobs::util::progress::ProgressSender

source ·
pub trait ProgressSender: Debug + Clone + Send + Sync + 'static {
     type Msg: Send + Sync + 'static;
 
     // Required methods
@@ -69,45 +69,45 @@ 

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§

type Msg: Send + Sync + 'static

The message being sent.

-

Required Methods§

fn send( +

Required Associated Types§

source

type Msg: Send + Sync + 'static

The message being sent.

+

Required Methods§

source

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.

-

fn try_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>

Try to send a message and drop it if the receiver is full.

+
source

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.

-

fn blocking_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>

Send a message and block if the receiver is full.

+
source

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§

fn with_map<U, F>(self, f: F) -> WithMap<Self, U, F>
where +

Provided Methods§

source

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.

-

fn with_filter_map<U, F>(self, f: F) -> WithFilterMap<Self, U, F>
where +

source

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.

-

fn boxed(self) -> BoxedProgressSender<Self::Msg>
where +

source

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§

§

impl<T> ProgressSender for Option<T>
where - T: ProgressSender,

§

type Msg = <T as ProgressSender>::Msg

§

async fn send( +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> ProgressSender for Option<T>
where + T: ProgressSender,

§

impl<T> ProgressSender for Arc<dyn BoxableProgressSender<T>>
where - T: Send + Sync + 'static,

§

type Msg = T

§

fn send( +) -> Result<(), ProgressSendError>

source§

impl<T> ProgressSender for Arc<dyn BoxableProgressSender<T>>
where + T: Send + Sync + 'static,

§

type Msg = T

source§

fn send( &self, msg: T -) -> 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 +) -> 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 I: ProgressSender, U: Send + Sync + 'static, - 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 + 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 I: ProgressSender, U: Send + Sync + 'static, - 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 IgnoreProgressSender<T>
where + 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 IgnoreProgressSender<T>
where T: Send + Sync + 'static,

§

type Msg = T

\ No newline at end of file diff --git a/pr/2656/docs/iroh/blobs/util/progress/type.ProgressSendResult.html b/pr/2656/docs/iroh/blobs/util/progress/type.ProgressSendResult.html index c401153b1d..9dfb46f0dd 100644 --- a/pr/2656/docs/iroh/blobs/util/progress/type.ProgressSendResult.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/blobs/util/struct.SparseMemFile.html b/pr/2656/docs/iroh/blobs/util/struct.SparseMemFile.html
index fce3b5f91d..430a0ec85c 100644
--- a/pr/2656/docs/iroh/blobs/util/struct.SparseMemFile.html
+++ b/pr/2656/docs/iroh/blobs/util/struct.SparseMemFile.html
@@ -1,10 +1,10 @@
-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

+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

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§

§

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

+

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

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§

§

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 +

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 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/2656/docs/iroh/blobs/util/struct.Tag.html b/pr/2656/docs/iroh/blobs/util/struct.Tag.html index 98346775b1..6f2a66ffbe 100644 --- a/pr/2656/docs/iroh/blobs/util/struct.Tag.html +++ b/pr/2656/docs/iroh/blobs/util/struct.Tag.html @@ -1,32 +1,32 @@ -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>( +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>( __deserializer: __D ) -> Result<Tag, <__D as Deserializer<'de>>::Error>
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 + __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 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
§

impl PartialEq for Tag

§

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
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 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 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 <= +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 <= 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
§

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 +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 Tag: 'a,

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

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

source§

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
§

fn type_name() -> TypeName

Globally unique identifier for this type

§

impl Serialize for Tag

§

fn serialize<__S>( + 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>( &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
§

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 + __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 Tag: 'a,

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

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

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/struct.TempTag.html b/pr/2656/docs/iroh/blobs/util/struct.TempTag.html index 6c72510bad..c854b893db 100644 --- a/pr/2656/docs/iroh/blobs/util/struct.TempTag.html +++ b/pr/2656/docs/iroh/blobs/util/struct.TempTag.html @@ -1,17 +1,17 @@ -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.

+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.

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§

§

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

+

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

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.

-

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 hash_and_format(&self) -> HashAndFormat

The hash and 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 +

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 hash_and_format(&self) -> HashAndFormat

The hash and 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/blobs/util/trait.TagCounter.html b/pr/2656/docs/iroh/blobs/util/trait.TagCounter.html index e696a80de3..803a1c0caf 100644 --- a/pr/2656/docs/iroh/blobs/util/trait.TagCounter.html +++ b/pr/2656/docs/iroh/blobs/util/trait.TagCounter.html @@ -1,4 +1,4 @@ -TagCounter in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagCounter

pub trait TagCounter: Sized + TagDrop {
+TagCounter in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagCounter

source ·
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§

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 +

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 diff --git a/pr/2656/docs/iroh/blobs/util/trait.TagDrop.html b/pr/2656/docs/iroh/blobs/util/trait.TagDrop.html index 437d4b5d44..13f4c979ee 100644 --- a/pr/2656/docs/iroh/blobs/util/trait.TagDrop.html +++ b/pr/2656/docs/iroh/blobs/util/trait.TagDrop.html @@ -1,7 +1,7 @@ -TagDrop in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagDrop

pub trait TagDrop: Debug + Send + Sync + 'static {
+TagDrop in iroh::blobs::util - Rust

Trait iroh::blobs::util::TagDrop

source ·
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§

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 +

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 diff --git a/pr/2656/docs/iroh/client/gossip/enum.SubscribeResponse.html b/pr/2656/docs/iroh/client/gossip/enum.SubscribeResponse.html index 25d09d1782..c6df8544b4 100644 --- a/pr/2656/docs/iroh/client/gossip/enum.SubscribeResponse.html +++ b/pr/2656/docs/iroh/client/gossip/enum.SubscribeResponse.html @@ -1,4 +1,4 @@ -SubscribeResponse in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeResponse

pub enum SubscribeResponse {
+SubscribeResponse in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeResponse

source ·
pub enum SubscribeResponse {
     Gossip(GossipEvent),
     Lagged,
 }
Expand description

Events emitted from a gossip topic with a lagging notification.

@@ -6,16 +6,16 @@ provide a notification if we missed gossip events for the topic.

Variants§

§

Gossip(GossipEvent)

We received an event.

§

Lagged

We missed some messages because our GossipReceiver was not progressing fast enough.

-

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>( +

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

source§

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
§

impl PartialEq for Event

§

fn eq(&self, other: &Event) -> 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
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 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 Serialize for Event

§

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

source§

impl Serialize for Event

source§

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
§

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 + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/client/gossip/enum.SubscribeUpdate.html b/pr/2656/docs/iroh/client/gossip/enum.SubscribeUpdate.html index ed598c3767..d70ec1f2e8 100644 --- a/pr/2656/docs/iroh/client/gossip/enum.SubscribeUpdate.html +++ b/pr/2656/docs/iroh/client/gossip/enum.SubscribeUpdate.html @@ -1,4 +1,4 @@ -SubscribeUpdate in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeUpdate

pub enum SubscribeUpdate {
+SubscribeUpdate in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeUpdate

source ·
pub enum SubscribeUpdate {
     Broadcast(Bytes),
     BroadcastNeighbors(Bytes),
     JoinPeers(Vec<PublicKey>),
@@ -6,10 +6,10 @@
 

Variants§

§

Broadcast(Bytes)

Broadcast a message to all nodes in the swarm

§

BroadcastNeighbors(Bytes)

Broadcast a message to all direct neighbors

§

JoinPeers(Vec<PublicKey>)

Connect to a set of peers

-

Trait Implementations§

§

impl Debug for Command

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Command

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Debug for Command

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 Command

source§

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
§

impl Serialize for Command

§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Serialize for Command

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/docs/metrics/struct.Metrics.html b/pr/2656/docs/iroh/docs/metrics/struct.Metrics.html index c3cd061f3c..47072f208f 100644 --- a/pr/2656/docs/iroh/docs/metrics/struct.Metrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/docs/struct.AuthorId.html b/pr/2656/docs/iroh/docs/struct.AuthorId.html index dbfe56cbc4..575ac8e7a5 100644 --- a/pr/2656/docs/iroh/docs/struct.AuthorId.html +++ b/pr/2656/docs/iroh/docs/struct.AuthorId.html @@ -155,7 +155,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>,

§

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

source§

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/2656/docs/iroh/docs/struct.AuthorPublicKey.html b/pr/2656/docs/iroh/docs/struct.AuthorPublicKey.html index aee587a54f..84f0d29e4f 100644 --- a/pr/2656/docs/iroh/docs/struct.AuthorPublicKey.html +++ b/pr/2656/docs/iroh/docs/struct.AuthorPublicKey.html @@ -147,7 +147,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>,

§

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

source§

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/2656/docs/iroh/docs/struct.DocTicket.html b/pr/2656/docs/iroh/docs/struct.DocTicket.html index e683a30215..81cbe0be57 100644 --- a/pr/2656/docs/iroh/docs/struct.DocTicket.html +++ b/pr/2656/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.
§

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 + __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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/docs/struct.NamespaceId.html b/pr/2656/docs/iroh/docs/struct.NamespaceId.html index 378c770127..ccaef0061b 100644 --- a/pr/2656/docs/iroh/docs/struct.NamespaceId.html +++ b/pr/2656/docs/iroh/docs/struct.NamespaceId.html @@ -155,7 +155,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>,

§

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

source§

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/2656/docs/iroh/docs/struct.NamespacePublicKey.html b/pr/2656/docs/iroh/docs/struct.NamespacePublicKey.html index 9115156375..4a3b8c025e 100644 --- a/pr/2656/docs/iroh/docs/struct.NamespacePublicKey.html +++ b/pr/2656/docs/iroh/docs/struct.NamespacePublicKey.html @@ -146,7 +146,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>,

§

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

source§

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/2656/docs/iroh/gossip/index.html b/pr/2656/docs/iroh/gossip/index.html index 1c9b23a83d..99497b1d57 100644 --- a/pr/2656/docs/iroh/gossip/index.html +++ b/pr/2656/docs/iroh/gossip/index.html @@ -1,4 +1,4 @@ -iroh::gossip - Rust

Crate iroh::gossip

Expand description

Broadcast messages to peers subscribed to a topic

+iroh::gossip - Rust

Crate iroh::gossip

source ·
Expand description

Broadcast messages to peers subscribed to a topic

The crate is designed to be used from the iroh crate, which provides a high level interface, but can also be used standalone.

diff --git a/pr/2656/docs/iroh/gossip/metrics/index.html b/pr/2656/docs/iroh/gossip/metrics/index.html index 924c994396..cff2df319e 100644 --- a/pr/2656/docs/iroh/gossip/metrics/index.html +++ b/pr/2656/docs/iroh/gossip/metrics/index.html @@ -1,2 +1,2 @@ -iroh::gossip::metrics - Rust

Module iroh::gossip::metrics

Expand description

Metrics for iroh-gossip

+iroh::gossip::metrics - Rust

Module iroh::gossip::metrics

source ·
Expand description

Metrics for iroh-gossip

Structs§

  • Enum of metrics for the module
\ No newline at end of file diff --git a/pr/2656/docs/iroh/gossip/metrics/struct.Metrics.html b/pr/2656/docs/iroh/gossip/metrics/struct.Metrics.html index 1757511c56..a35c27adbe 100644 --- a/pr/2656/docs/iroh/gossip/metrics/struct.Metrics.html +++ b/pr/2656/docs/iroh/gossip/metrics/struct.Metrics.html @@ -1,26 +1,26 @@ -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, +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,
}
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html b/pr/2656/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html index f296206fa0..0364475765 100644 --- a/pr/2656/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html +++ b/pr/2656/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

pub const GOSSIP_ALPN: &'static [u8];
Expand description

ALPN protocol name

+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

\ No newline at end of file diff --git a/pr/2656/docs/iroh/gossip/net/enum.Command.html b/pr/2656/docs/iroh/gossip/net/enum.Command.html index 37bd624124..edce984a0c 100644 --- a/pr/2656/docs/iroh/gossip/net/enum.Command.html +++ b/pr/2656/docs/iroh/gossip/net/enum.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::net - Rust

Enum iroh::gossip::net::Command

pub enum Command {
+Command in iroh::gossip::net - Rust

Enum iroh::gossip::net::Command

source ·
pub enum Command {
     Broadcast(Bytes),
     BroadcastNeighbors(Bytes),
     JoinPeers(Vec<PublicKey>),
@@ -6,10 +6,10 @@
 

Variants§

§

Broadcast(Bytes)

Broadcast a message to all nodes in the swarm

§

BroadcastNeighbors(Bytes)

Broadcast a message to all direct neighbors

§

JoinPeers(Vec<PublicKey>)

Connect to a set of peers

-

Trait Implementations§

§

impl Debug for Command

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Command

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Debug for Command

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 Command

source§

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
§

impl Serialize for Command

§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Serialize for Command

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/gossip/net/enum.Event.html b/pr/2656/docs/iroh/gossip/net/enum.Event.html index 6b0cf7bc9d..9c76aedb80 100644 --- a/pr/2656/docs/iroh/gossip/net/enum.Event.html +++ b/pr/2656/docs/iroh/gossip/net/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::gossip::net - Rust

Enum iroh::gossip::net::Event

pub enum Event {
+Event in iroh::gossip::net - Rust

Enum iroh::gossip::net::Event

source ·
pub enum Event {
     Gossip(GossipEvent),
     Lagged,
 }
Expand description

Events emitted from a gossip topic with a lagging notification.

@@ -6,16 +6,16 @@ provide a notification if we missed gossip events for the topic.

Variants§

§

Gossip(GossipEvent)

We received an event.

§

Lagged

We missed some messages because our GossipReceiver was not progressing fast enough.

-

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>( +

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

source§

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
§

impl PartialEq for Event

§

fn eq(&self, other: &Event) -> 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
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 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 Serialize for Event

§

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

source§

impl Serialize for Event

source§

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
§

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 + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/net/enum.GossipEvent.html b/pr/2656/docs/iroh/gossip/net/enum.GossipEvent.html index bcf695d7f8..eb9eee4178 100644 --- a/pr/2656/docs/iroh/gossip/net/enum.GossipEvent.html +++ b/pr/2656/docs/iroh/gossip/net/enum.GossipEvent.html @@ -1,4 +1,4 @@ -GossipEvent in iroh::gossip::net - Rust

Enum iroh::gossip::net::GossipEvent

pub enum GossipEvent {
+GossipEvent in iroh::gossip::net - Rust

Enum iroh::gossip::net::GossipEvent

source ·
pub enum GossipEvent {
     Joined(Vec<PublicKey>),
     NeighborUp(PublicKey),
     NeighborDown(PublicKey),
@@ -10,21 +10,21 @@
 
§

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)

We received a gossip message for this topic.

-

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>( +

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

source§

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
§

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 + __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 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
§

impl PartialEq for GossipEvent

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for GossipEvent

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for GossipEvent

source§

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
§

impl Eq for GossipEvent

§

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
source§

impl Eq for GossipEvent

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/net/index.html b/pr/2656/docs/iroh/gossip/net/index.html index 05cfe2c744..130a9d3f22 100644 --- a/pr/2656/docs/iroh/gossip/net/index.html +++ b/pr/2656/docs/iroh/gossip/net/index.html @@ -1,2 +1,2 @@ -iroh::gossip::net - Rust

Module iroh::gossip::net

Expand description

Networking for the iroh-gossip protocol

+iroh::gossip::net - Rust

Module iroh::gossip::net

source ·
Expand description

Networking for the iroh-gossip protocol

Modules§

  • Utilities for iroh-gossip networking

Structs§

Enums§

  • Send a gossip message
  • Events emitted from a gossip topic with a lagging notification.
  • Events emitted from a gossip topic.

Constants§

Type Aliases§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/gossip/net/struct.Gossip.html b/pr/2656/docs/iroh/gossip/net/struct.Gossip.html index 786df6a66b..83e074a92a 100644 --- a/pr/2656/docs/iroh/gossip/net/struct.Gossip.html +++ b/pr/2656/docs/iroh/gossip/net/struct.Gossip.html @@ -1,4 +1,4 @@ -Gossip in iroh::gossip::net - Rust

Struct iroh::gossip::net::Gossip

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

Publish and subscribe on gossiping topics.

+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.

@@ -10,20 +10,20 @@ 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§

§

impl Gossip

pub fn from_endpoint( +

Implementations§

source§

impl Gossip

source

pub fn from_endpoint( endpoint: Endpoint, config: Config, my_addr: &AddrInfo ) -> Gossip

Spawn a gossip actor and get a handle for it

-

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

-

pub async fn handle_connection(&self, conn: Connection) -> Result<(), Error>

Handle an incoming Connection.

+
source

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

+
source

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.

-

pub async fn join( +

source

pub async fn join( &self, topic_id: TopicId, bootstrap: Vec<PublicKey> ) -> Result<GossipTopic, Error>

Join a gossip topic with the default options and wait for at least one active connection.

-

pub fn join_with_opts( +

source

pub fn join_with_opts( &self, topic_id: TopicId, opts: JoinOptions @@ -32,7 +32,7 @@ you can await GossipTopic::joined.

Messages will be queued until a first connection is available. If the internal channel becomes full, the oldest messages will be dropped from the channel.

-

pub fn join_with_stream( +

source

pub fn join_with_stream( &self, topic_id: TopicId, options: JoinOptions, @@ -42,7 +42,7 @@ instead of using a channel created for you.

It returns a stream of events. If you want to wait for the topic to become active, wait for the GossipEvent::Joined event.

-

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/net/struct.GossipReceiver.html b/pr/2656/docs/iroh/gossip/net/struct.GossipReceiver.html index 22118ae4cf..c170471e25 100644 --- a/pr/2656/docs/iroh/gossip/net/struct.GossipReceiver.html +++ b/pr/2656/docs/iroh/gossip/net/struct.GossipReceiver.html @@ -1,13 +1,13 @@ -GossipReceiver in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipReceiver

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

Receiver for gossip events on a topic.

+GossipReceiver in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipReceiver

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

Receiver for gossip events on a topic.

This is a [Stream] of Events emitted from the topic.

-

Implementations§

§

impl GossipReceiver

pub fn neighbors(&self) -> impl Iterator<Item = PublicKey>

Lists our current direct neighbors.

-

pub async fn joined(&mut self) -> Result<(), Error>

Waits until we are connected to at least one node.

+

Implementations§

source§

impl GossipReceiver

source

pub fn neighbors(&self) -> impl Iterator<Item = PublicKey>

Lists our current direct neighbors.

+
source

pub async fn joined(&mut self) -> Result<(), Error>

Waits until we are connected to at least one node.

This progresses the stream until we received GossipEvent::Joined, which is the first item emitted on the stream.

Note that this consumes the GossipEvent::Joined event. If you want to act on these initial neighbors, use Self::neighbors after awaiting Self::joined.

-

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

-

Trait Implementations§

§

impl Debug for GossipReceiver

§

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

Formats the value using the given formatter. Read more
§

impl Stream for GossipReceiver

§

type Item = Result<Event, Error>

Values yielded by the stream.
§

fn poll_next( +

source

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

+

Trait Implementations§

source§

impl Debug for GossipReceiver

source§

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

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

impl Stream for GossipReceiver

§

type Item = Result<Event, Error>

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut GossipReceiver>, cx: &mut Context<'_> ) -> Poll<Option<<GossipReceiver as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the diff --git a/pr/2656/docs/iroh/gossip/net/struct.GossipSender.html b/pr/2656/docs/iroh/gossip/net/struct.GossipSender.html index 41190f7464..80b01c446b 100644 --- a/pr/2656/docs/iroh/gossip/net/struct.GossipSender.html +++ b/pr/2656/docs/iroh/gossip/net/struct.GossipSender.html @@ -1,8 +1,8 @@ -GossipSender in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipSender

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

Sender for a gossip topic.

-

Implementations§

§

impl GossipSender

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to all nodes.

-

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to our direct neighbors.

-

pub async fn join_peers(&self, peers: Vec<PublicKey>) -> Result<(), Error>

Join a set of peers.

-

Trait Implementations§

§

impl Debug for GossipSender

§

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 +GossipSender in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipSender

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

Sender for a gossip topic.

+

Implementations§

source§

impl GossipSender

source

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to all nodes.

+
source

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to our direct neighbors.

+
source

pub async fn join_peers(&self, peers: Vec<PublicKey>) -> Result<(), Error>

Join a set of peers.

+

Trait Implementations§

source§

impl Debug for GossipSender

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/net/struct.GossipTopic.html b/pr/2656/docs/iroh/gossip/net/struct.GossipTopic.html index 704ab3d8f8..de5b7dc755 100644 --- a/pr/2656/docs/iroh/gossip/net/struct.GossipTopic.html +++ b/pr/2656/docs/iroh/gossip/net/struct.GossipTopic.html @@ -1,12 +1,12 @@ -GossipTopic in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipTopic

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

Subscribed gossip topic.

+GossipTopic in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipTopic

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

Subscribed gossip topic.

This handle is a [Stream] of Events from the topic, and can be used to send messages.

It may be split into sender and receiver parts with Self::split.

-

Implementations§

§

impl GossipTopic

pub fn split(self) -> (GossipSender, GossipReceiver)

Splits self into GossipSender and GossipReceiver parts.

-

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Sends a message to all peers.

-

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Sends a message to our direct neighbors in the swarm.

-

pub async fn joined(&mut self) -> Result<(), Error>

Waits until we are connected to at least one node.

-

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

-

Trait Implementations§

§

impl Debug for GossipTopic

§

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

Formats the value using the given formatter. Read more
§

impl Stream for GossipTopic

§

type Item = Result<Event, Error>

Values yielded by the stream.
§

fn poll_next( +

Implementations§

source§

impl GossipTopic

source

pub fn split(self) -> (GossipSender, GossipReceiver)

Splits self into GossipSender and GossipReceiver parts.

+
source

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Sends a message to all peers.

+
source

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Sends a message to our direct neighbors in the swarm.

+
source

pub async fn joined(&mut self) -> Result<(), Error>

Waits until we are connected to at least one node.

+
source

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

+

Trait Implementations§

source§

impl Debug for GossipTopic

source§

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

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

impl Stream for GossipTopic

§

type Item = Result<Event, Error>

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut GossipTopic>, cx: &mut Context<'_> ) -> Poll<Option<<GossipTopic as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the diff --git a/pr/2656/docs/iroh/gossip/net/struct.JoinOptions.html b/pr/2656/docs/iroh/gossip/net/struct.JoinOptions.html index a9fe253c5b..c415dafc21 100644 --- a/pr/2656/docs/iroh/gossip/net/struct.JoinOptions.html +++ b/pr/2656/docs/iroh/gossip/net/struct.JoinOptions.html @@ -1,4 +1,4 @@ -JoinOptions in iroh::gossip::net - Rust

Struct iroh::gossip::net::JoinOptions

pub struct JoinOptions {
+JoinOptions in iroh::gossip::net - Rust

Struct iroh::gossip::net::JoinOptions

source ·
pub struct JoinOptions {
     pub bootstrap: BTreeSet<PublicKey>,
     pub subscription_capacity: usize,
 }
Expand description

Options for joining a gossip topic.

@@ -8,12 +8,12 @@ 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.

-

Implementations§

§

impl JoinOptions

pub fn with_bootstrap(nodes: impl IntoIterator<Item = PublicKey>) -> JoinOptions

Creates JoinOptions with the provided bootstrap nodes and the default subscription +

Implementations§

source§

impl JoinOptions

source

pub fn with_bootstrap(nodes: impl IntoIterator<Item = PublicKey>) -> JoinOptions

Creates JoinOptions with the provided bootstrap nodes and the default subscription capacity.

-

Trait Implementations§

§

impl Debug for JoinOptions

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for JoinOptions

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Debug for JoinOptions

source§

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

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

impl<'de> Deserialize<'de> for JoinOptions

source§

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

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

impl Serialize for JoinOptions

§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Serialize for JoinOptions

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/gossip/net/struct.Message.html b/pr/2656/docs/iroh/gossip/net/struct.Message.html index 84dfc8d5cb..a763517979 100644 --- a/pr/2656/docs/iroh/gossip/net/struct.Message.html +++ b/pr/2656/docs/iroh/gossip/net/struct.Message.html @@ -1,4 +1,4 @@ -Message in iroh::gossip::net - Rust

Struct iroh::gossip::net::Message

pub struct Message {
+Message in iroh::gossip::net - Rust

Struct iroh::gossip::net::Message

source ·
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§

§

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, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Message

§

fn deserialize<__D>( +

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, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

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

impl<'de> Deserialize<'de> for Message

source§

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
§

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 + __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 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
§

impl PartialEq for Message

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for Message

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for Message

source§

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
§

impl Eq for Message

§

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
source§

impl Eq for Message

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/net/type.CommandStream.html b/pr/2656/docs/iroh/gossip/net/type.CommandStream.html index 14a68bafac..c5ce7cdd07 100644 --- a/pr/2656/docs/iroh/gossip/net/type.CommandStream.html +++ b/pr/2656/docs/iroh/gossip/net/type.CommandStream.html @@ -1,2 +1,2 @@ -CommandStream in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::CommandStream

pub type CommandStream = Pin<Box<dyn Stream<Item = Command> + Send + Sync>>;
Expand description

A stream of commands for a gossip subscription.

+CommandStream in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::CommandStream

source ·
pub type CommandStream = Pin<Box<dyn Stream<Item = Command> + Send + Sync>>;
Expand description

A stream of commands for a gossip subscription.

Aliased Type§

struct CommandStream { /* private fields */ }
\ No newline at end of file diff --git a/pr/2656/docs/iroh/gossip/net/type.ProtoCommand.html b/pr/2656/docs/iroh/gossip/net/type.ProtoCommand.html index 4932bf3033..33c2759f61 100644 --- a/pr/2656/docs/iroh/gossip/net/type.ProtoCommand.html +++ b/pr/2656/docs/iroh/gossip/net/type.ProtoCommand.html @@ -1,4 +1,4 @@ -ProtoCommand in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoCommand

pub type ProtoCommand = Command<PublicKey>;
Expand description

Commands for the gossip protocol

+ProtoCommand in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoCommand

source ·
pub type ProtoCommand = Command<PublicKey>;
Expand description

Commands for the gossip protocol

Aliased Type§

enum ProtoCommand {
     Join(Vec<PublicKey>),
     Broadcast(Bytes, Scope),
diff --git a/pr/2656/docs/iroh/gossip/net/type.ProtoEvent.html b/pr/2656/docs/iroh/gossip/net/type.ProtoEvent.html
index f1550f1637..fdcf4794fb 100644
--- a/pr/2656/docs/iroh/gossip/net/type.ProtoEvent.html
+++ b/pr/2656/docs/iroh/gossip/net/type.ProtoEvent.html
@@ -1,4 +1,4 @@
-ProtoEvent in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoEvent

pub type ProtoEvent = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

+ProtoEvent in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoEvent

source ·
pub type ProtoEvent = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

Aliased Type§

enum ProtoEvent {
     NeighborUp(PublicKey),
     NeighborDown(PublicKey),
diff --git a/pr/2656/docs/iroh/gossip/net/util/fn.read_lp.html b/pr/2656/docs/iroh/gossip/net/util/fn.read_lp.html
index 88113f1434..87a199f38d 100644
--- a/pr/2656/docs/iroh/gossip/net/util/fn.read_lp.html
+++ b/pr/2656/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

pub async fn read_lp(
+read_lp in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_lp

source ·
pub async fn read_lp(
     reader: impl AsyncRead + Unpin,
     buffer: &mut BytesMut,
     max_message_size: usize
diff --git a/pr/2656/docs/iroh/gossip/net/util/fn.read_message.html b/pr/2656/docs/iroh/gossip/net/util/fn.read_message.html
index 81b79f2e21..c3588938e7 100644
--- a/pr/2656/docs/iroh/gossip/net/util/fn.read_message.html
+++ b/pr/2656/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

pub async fn read_message(
+read_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_message

source ·
pub async fn read_message(
     reader: impl AsyncRead + Unpin,
     buffer: &mut BytesMut,
     max_message_size: usize
diff --git a/pr/2656/docs/iroh/gossip/net/util/fn.write_message.html b/pr/2656/docs/iroh/gossip/net/util/fn.write_message.html
index dcd97aea2f..e22f59915c 100644
--- a/pr/2656/docs/iroh/gossip/net/util/fn.write_message.html
+++ b/pr/2656/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

pub async fn write_message<W>(
+write_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::write_message

source ·
pub async fn write_message<W>(
     writer: &mut W,
     buffer: &mut BytesMut,
     frame: &Message<PublicKey>,
diff --git a/pr/2656/docs/iroh/gossip/net/util/index.html b/pr/2656/docs/iroh/gossip/net/util/index.html
index 3674386b71..8c89657f63 100644
--- a/pr/2656/docs/iroh/gossip/net/util/index.html
+++ b/pr/2656/docs/iroh/gossip/net/util/index.html
@@ -1,2 +1,2 @@
-iroh::gossip::net::util - Rust

Module iroh::gossip::net::util

Expand description

Utilities for iroh-gossip networking

+iroh::gossip::net::util - Rust

Module iroh::gossip::net::util

source ·
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/2656/docs/iroh/gossip/net/util/struct.Timers.html b/pr/2656/docs/iroh/gossip/net/util/struct.Timers.html index 319c23c230..da33a6979d 100644 --- a/pr/2656/docs/iroh/gossip/net/util/struct.Timers.html +++ b/pr/2656/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

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

+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

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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/enum.Command.html b/pr/2656/docs/iroh/gossip/proto/enum.Command.html index 461bc4ef2b..92e26e3f3d 100644 --- a/pr/2656/docs/iroh/gossip/proto/enum.Command.html +++ b/pr/2656/docs/iroh/gossip/proto/enum.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Command

pub enum Command<PI> {
+Command in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Command

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/enum.DeliveryScope.html b/pr/2656/docs/iroh/gossip/proto/enum.DeliveryScope.html index bc042a8609..13c59bbdd5 100644 --- a/pr/2656/docs/iroh/gossip/proto/enum.DeliveryScope.html +++ b/pr/2656/docs/iroh/gossip/proto/enum.DeliveryScope.html @@ -1,4 +1,4 @@ -DeliveryScope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::DeliveryScope

pub enum DeliveryScope {
+DeliveryScope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::DeliveryScope

source ·
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§

§

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>( +

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

source§

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
§

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 + __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 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
§

impl PartialEq for DeliveryScope

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for DeliveryScope

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for DeliveryScope

source§

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
§

impl Copy for DeliveryScope

§

impl Eq for DeliveryScope

§

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
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/proto/enum.Event.html b/pr/2656/docs/iroh/gossip/proto/enum.Event.html index ce38bc542d..e48411660a 100644 --- a/pr/2656/docs/iroh/gossip/proto/enum.Event.html +++ b/pr/2656/docs/iroh/gossip/proto/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Event

pub enum Event<PI> {
+Event in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Event

source ·
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§

§

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>( +

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>,

source§

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
§

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 + __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 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
§

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 + 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 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<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 <= +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 <= 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
§

impl<PI> Serialize for Event<PI>
where - PI: Serialize,

§

fn serialize<__S>( +operator. Read more

source§

impl<PI> Serialize for Event<PI>
where + PI: Serialize,

source§

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
§

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 + __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 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/2656/docs/iroh/gossip/proto/enum.InEvent.html b/pr/2656/docs/iroh/gossip/proto/enum.InEvent.html index ea18d07b8f..97280dc741 100644 --- a/pr/2656/docs/iroh/gossip/proto/enum.InEvent.html +++ b/pr/2656/docs/iroh/gossip/proto/enum.InEvent.html @@ -1,4 +1,4 @@ -InEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::InEvent

pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::InEvent

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/enum.OutEvent.html b/pr/2656/docs/iroh/gossip/proto/enum.OutEvent.html index 296e9c3af5..985ad6bf11 100644 --- a/pr/2656/docs/iroh/gossip/proto/enum.OutEvent.html +++ b/pr/2656/docs/iroh/gossip/proto/enum.OutEvent.html @@ -1,4 +1,4 @@ -OutEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::OutEvent

pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::OutEvent

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/enum.Scope.html b/pr/2656/docs/iroh/gossip/proto/enum.Scope.html index c3028c046f..d70946586a 100644 --- a/pr/2656/docs/iroh/gossip/proto/enum.Scope.html +++ b/pr/2656/docs/iroh/gossip/proto/enum.Scope.html @@ -1,24 +1,24 @@ -Scope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Scope

pub enum Scope {
+Scope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Scope

source ·
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§

§

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>( +

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

source§

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
§

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 + __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 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
§

impl PartialEq for Scope

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for Scope

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for Scope

source§

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
§

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 + __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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/proto/index.html b/pr/2656/docs/iroh/gossip/proto/index.html index 6bae1c916d..a7bb37fd50 100644 --- a/pr/2656/docs/iroh/gossip/proto/index.html +++ b/pr/2656/docs/iroh/gossip/proto/index.html @@ -1,4 +1,4 @@ -iroh::gossip::proto - Rust

Module iroh::gossip::proto

Expand description

Implementation of the iroh-gossip protocol, as an IO-less state machine

+iroh::gossip::proto - Rust

Module iroh::gossip::proto

source ·
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/2656/docs/iroh/gossip/proto/state/enum.InEvent.html b/pr/2656/docs/iroh/gossip/proto/state/enum.InEvent.html index 533731f330..76f1f0b621 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/enum.InEvent.html +++ b/pr/2656/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

pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::InEvent

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/state/enum.MessageKind.html b/pr/2656/docs/iroh/gossip/proto/state/enum.MessageKind.html index d10163776b..985b4eed88 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/enum.MessageKind.html +++ b/pr/2656/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

pub enum MessageKind {
+MessageKind in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::MessageKind

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/proto/state/enum.OutEvent.html b/pr/2656/docs/iroh/gossip/proto/state/enum.OutEvent.html index 12ac873605..654f7a4aa0 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/enum.OutEvent.html +++ b/pr/2656/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

pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::OutEvent

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/state/index.html b/pr/2656/docs/iroh/gossip/proto/state/index.html index e68faeed2e..dec9206691 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/index.html +++ b/pr/2656/docs/iroh/gossip/proto/state/index.html @@ -1,2 +1,2 @@ -iroh::gossip::proto::state - Rust

Module iroh::gossip::proto::state

Expand description

The protocol state of the iroh-gossip protocol.

+iroh::gossip::proto::state - Rust

Module iroh::gossip::proto::state

source ·
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/2656/docs/iroh/gossip/proto/state/struct.Message.html b/pr/2656/docs/iroh/gossip/proto/state/struct.Message.html index 73cadbc554..e4e3087af3 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/struct.Message.html +++ b/pr/2656/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

pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

+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

This is the wire frame of the iroh-gossip protocol.

-

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>( +

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>,

source§

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
§

impl<PI> Serialize for Message<PI>
where - PI: Serialize,

§

fn serialize<__S>( + __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>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/gossip/proto/state/struct.State.html b/pr/2656/docs/iroh/gossip/proto/state/struct.State.html index 43b020fe66..a1dbdca6c0 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/struct.State.html +++ b/pr/2656/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

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

source ·
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§

§

impl<PI, R> State<PI, R>
where +

Implementations§

source§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng + Clone,

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

+ 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.

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.

-

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( +

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( &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§

§

impl<PI, R> Debug for State<PI, R>
where +

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - 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>
where + 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>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2656/docs/iroh/gossip/proto/state/struct.Timer.html b/pr/2656/docs/iroh/gossip/proto/state/struct.Timer.html index d76be1da05..8a82578dee 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/struct.Timer.html +++ b/pr/2656/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

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

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/state/struct.TopicId.html b/pr/2656/docs/iroh/gossip/proto/state/struct.TopicId.html index 11084459c3..169314b815 100644 --- a/pr/2656/docs/iroh/gossip/proto/state/struct.TopicId.html +++ b/pr/2656/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

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>( +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>( __deserializer: __D ) -> Result<TopicId, <__D as Deserializer<'de>>::Error>
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 + __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 __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 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,

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,

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
§

impl PartialEq for TopicId

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for TopicId

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for TopicId

source§

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
§

impl Copy for TopicId

§

impl Eq for TopicId

§

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
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 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 @@ -147,7 +147,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>,

§

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

source§

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/2656/docs/iroh/gossip/proto/struct.Config.html b/pr/2656/docs/iroh/gossip/proto/struct.Config.html index 284f09342c..c9e3db4070 100644 --- a/pr/2656/docs/iroh/gossip/proto/struct.Config.html +++ b/pr/2656/docs/iroh/gossip/proto/struct.Config.html @@ -1,4 +1,4 @@ -Config in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Config

pub struct Config {
+Config in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Config

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/proto/struct.Message.html b/pr/2656/docs/iroh/gossip/proto/struct.Message.html index e88d189fe6..13acccce64 100644 --- a/pr/2656/docs/iroh/gossip/proto/struct.Message.html +++ b/pr/2656/docs/iroh/gossip/proto/struct.Message.html @@ -1,16 +1,16 @@ -Message in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Message

pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

+Message in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Message

source ·
pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

This is the wire frame of the iroh-gossip protocol.

-

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>( +

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>,

source§

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
§

impl<PI> Serialize for Message<PI>
where - PI: Serialize,

§

fn serialize<__S>( + __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>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2656/docs/iroh/gossip/proto/struct.PeerData.html b/pr/2656/docs/iroh/gossip/proto/struct.PeerData.html index ef766832bf..f94ec3e4f3 100644 --- a/pr/2656/docs/iroh/gossip/proto/struct.PeerData.html +++ b/pr/2656/docs/iroh/gossip/proto/struct.PeerData.html @@ -1,19 +1,19 @@ -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.

+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.

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§

§

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>( +

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

source§

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
§

impl PartialEq for PeerData

§

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
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 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 Serialize for PeerData

§

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

source§

impl Serialize for PeerData

source§

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
§

impl Eq for PeerData

§

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
source§

impl Eq for PeerData

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/proto/struct.State.html b/pr/2656/docs/iroh/gossip/proto/struct.State.html index 1b5b75fb53..b0f729063f 100644 --- a/pr/2656/docs/iroh/gossip/proto/struct.State.html +++ b/pr/2656/docs/iroh/gossip/proto/struct.State.html @@ -1,31 +1,31 @@ -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.

+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.

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§

§

impl<PI, R> State<PI, R>
where +

Implementations§

source§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng + Clone,

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

+ 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.

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.

-

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( +

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( &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§

§

impl<PI, R> Debug for State<PI, R>
where +

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - 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>
where + 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>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2656/docs/iroh/gossip/proto/struct.Timer.html b/pr/2656/docs/iroh/gossip/proto/struct.Timer.html index b175fc41cc..b65cfbb1e3 100644 --- a/pr/2656/docs/iroh/gossip/proto/struct.Timer.html +++ b/pr/2656/docs/iroh/gossip/proto/struct.Timer.html @@ -1,11 +1,11 @@ -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

+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

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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/struct.TopicId.html b/pr/2656/docs/iroh/gossip/proto/struct.TopicId.html index a4895e143e..408684d926 100644 --- a/pr/2656/docs/iroh/gossip/proto/struct.TopicId.html +++ b/pr/2656/docs/iroh/gossip/proto/struct.TopicId.html @@ -1,25 +1,25 @@ -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>( +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>( __deserializer: __D ) -> Result<TopicId, <__D as Deserializer<'de>>::Error>
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 + __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 __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 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,

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,

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
§

impl PartialEq for TopicId

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for TopicId

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for TopicId

source§

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
§

impl Copy for TopicId

§

impl Eq for TopicId

§

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
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 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 @@ -147,7 +147,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>,

§

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

source§

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/2656/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html b/pr/2656/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html index 3abee9684a..5a0a38a46f 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html +++ b/pr/2656/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

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

source ·
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/2656/docs/iroh/gossip/proto/topic/enum.Command.html b/pr/2656/docs/iroh/gossip/proto/topic/enum.Command.html index eb75ef1b43..c2e356afaa 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/enum.Command.html +++ b/pr/2656/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

pub enum Command<PI> {
+Command in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Command

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/topic/enum.Event.html b/pr/2656/docs/iroh/gossip/proto/topic/enum.Event.html index a678214be7..db72f1bcd8 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/enum.Event.html +++ b/pr/2656/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

pub enum Event<PI> {
+Event in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Event

source ·
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§

§

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>( +

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>,

source§

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
§

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 + __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 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
§

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 + 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 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<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 <= +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 <= 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
§

impl<PI> Serialize for Event<PI>
where - PI: Serialize,

§

fn serialize<__S>( +operator. Read more

source§

impl<PI> Serialize for Event<PI>
where + PI: Serialize,

source§

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
§

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 + __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 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/2656/docs/iroh/gossip/proto/topic/enum.InEvent.html b/pr/2656/docs/iroh/gossip/proto/topic/enum.InEvent.html index 4d7ec66e04..9568d24096 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/enum.InEvent.html +++ b/pr/2656/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

pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::InEvent

source ·
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§

§

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 +

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 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/2656/docs/iroh/gossip/proto/topic/enum.Message.html b/pr/2656/docs/iroh/gossip/proto/topic/enum.Message.html index 719950186b..24f2425d29 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/enum.Message.html +++ b/pr/2656/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

pub enum Message<PI> {
+Message in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Message

source ·
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§

§

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>( +

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>,

source§

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
§

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 + __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 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<PI> Serialize for Message<PI>
where - PI: Serialize,

§

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

source§

impl<PI> Serialize for Message<PI>
where + PI: Serialize,

source§

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
§

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 + __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 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/2656/docs/iroh/gossip/proto/topic/enum.OutEvent.html b/pr/2656/docs/iroh/gossip/proto/topic/enum.OutEvent.html index d4eaa64e95..a97dd66fa6 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/enum.OutEvent.html +++ b/pr/2656/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

pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::OutEvent

source ·
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§

§

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 +

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 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<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 +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 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/2656/docs/iroh/gossip/proto/topic/enum.Timer.html b/pr/2656/docs/iroh/gossip/proto/topic/enum.Timer.html index c21733aa84..b9139af104 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/enum.Timer.html +++ b/pr/2656/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

pub enum Timer<PI> {
+Timer in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Timer

source ·
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§

§

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 +

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 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<PI> Eq for Timer<PI>
where - PI: Eq,

§

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.

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 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/2656/docs/iroh/gossip/proto/topic/index.html b/pr/2656/docs/iroh/gossip/proto/topic/index.html index ac9ec5a783..a9b37cc1ea 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/index.html +++ b/pr/2656/docs/iroh/gossip/proto/topic/index.html @@ -1,3 +1,3 @@ -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

+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

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/2656/docs/iroh/gossip/proto/topic/struct.Config.html b/pr/2656/docs/iroh/gossip/proto/topic/struct.Config.html index 44c44bd72d..f6c6994e0b 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/struct.Config.html +++ b/pr/2656/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

pub struct Config {
+Config in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Config

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/proto/topic/struct.State.html b/pr/2656/docs/iroh/gossip/proto/topic/struct.State.html index 5d47f3c96a..754cbb9b0b 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/struct.State.html +++ b/pr/2656/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

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( +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( me: PI, me_data: Option<PeerData>, config: Config ) -> State<PI, StdRng>

Initialize the local state with the default random number generator.

-
§

impl<PI, R> State<PI, R>

pub fn endpoint(&self) -> &PI

The address of your local endpoint.

-
§

impl<PI, R> State<PI, R>
where +

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 PI: PeerIdentity, - R: Rng,

pub fn with_rng( + R: Rng,

source

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.

-

pub fn handle( +

source

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.

-

pub fn stats(&self) -> &Stats

Get stats on how many messages were sent and received

+
source

pub fn stats(&self) -> &Stats

Get stats on how many messages were sent and received

TODO: Remove/replace with metrics?

-

pub fn gossip_stats(&self) -> &Stats

Get statistics for the gossip broadcast state

+
source

pub fn gossip_stats(&self) -> &Stats

Get statistics for the gossip broadcast state

TODO: Remove/replace with metrics?

-

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 +

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 PI: Debug, - 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>
where + 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>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2656/docs/iroh/gossip/proto/topic/struct.Stats.html b/pr/2656/docs/iroh/gossip/proto/topic/struct.Stats.html index b472c602cc..cb044c7573 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/struct.Stats.html +++ b/pr/2656/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

pub struct Stats {
+Stats in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Stats

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/gossip/proto/topic/trait.IO.html b/pr/2656/docs/iroh/gossip/proto/topic/trait.IO.html index 1d525a3a08..6aaa550270 100644 --- a/pr/2656/docs/iroh/gossip/proto/topic/trait.IO.html +++ b/pr/2656/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

pub trait IO<PI>
where +IO in iroh::gossip::proto::topic - Rust

Trait iroh::gossip::proto::topic::IO

source ·
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§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

-

Provided Methods§

Required Methods§

source

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

+

Provided Methods§

source

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§

§

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 +

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 diff --git a/pr/2656/docs/iroh/gossip/proto/trait.IO.html b/pr/2656/docs/iroh/gossip/proto/trait.IO.html index 2564076464..9aabc02d3a 100644 --- a/pr/2656/docs/iroh/gossip/proto/trait.IO.html +++ b/pr/2656/docs/iroh/gossip/proto/trait.IO.html @@ -1,4 +1,4 @@ -IO in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::IO

pub trait IO<PI>
where +IO in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::IO

source ·
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§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

-

Provided Methods§

Required Methods§

source

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

+

Provided Methods§

source

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§

§

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 +

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 diff --git a/pr/2656/docs/iroh/gossip/proto/trait.PeerIdentity.html b/pr/2656/docs/iroh/gossip/proto/trait.PeerIdentity.html index 9184d98dc5..f4d93a6aef 100644 --- a/pr/2656/docs/iroh/gossip/proto/trait.PeerIdentity.html +++ b/pr/2656/docs/iroh/gossip/proto/trait.PeerIdentity.html @@ -1,4 +1,4 @@ -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.

+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.

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§

§

impl<T> PeerIdentity for T
where +

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/gossip/proto/util/index.html b/pr/2656/docs/iroh/gossip/proto/util/index.html index fea1d4e458..c546611806 100644 --- a/pr/2656/docs/iroh/gossip/proto/util/index.html +++ b/pr/2656/docs/iroh/gossip/proto/util/index.html @@ -1,2 +1,2 @@ -iroh::gossip::proto::util - Rust

Module iroh::gossip::proto::util

Expand description

Utilities used in the protocol implementation

+iroh::gossip::proto::util - Rust

Module iroh::gossip::proto::util

source ·
Expand description

Utilities used in the protocol implementation

Structs§

\ No newline at end of file diff --git a/pr/2656/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html b/pr/2656/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html index 17c8d12a43..250e0f64e9 100644 --- a/pr/2656/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html +++ b/pr/2656/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

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.

+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.

Returns the number of items that were removed.

-

Trait Implementations§

§

impl<K, V> Debug for TimeBoundCache<K, V>
where +

Trait Implementations§

source§

impl<K, V> Debug for TimeBoundCache<K, V>
where K: Debug, - 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>
where + 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>

§

impl<K, V> Send for TimeBoundCache<K, V>
where K: Send, diff --git a/pr/2656/docs/iroh/gossip/proto/util/struct.TimerMap.html b/pr/2656/docs/iroh/gossip/proto/util/struct.TimerMap.html index 5ff04973e9..95b821d61b 100644 --- a/pr/2656/docs/iroh/gossip/proto/util/struct.TimerMap.html +++ b/pr/2656/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

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( +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( &mut self, from: &Instant ) -> impl Iterator<Item = (Instant, T)>

Remove and return all entries before and equal to from.

-

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 +

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 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/2656/docs/iroh/metrics/struct.Metrics.html b/pr/2656/docs/iroh/metrics/struct.Metrics.html index 670c9016ad..b91b901dd8 100644 --- a/pr/2656/docs/iroh/metrics/struct.Metrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/dialer/struct.Dialer.html b/pr/2656/docs/iroh/net/dialer/struct.Dialer.html index b47989eaf8..312a69f094 100644 --- a/pr/2656/docs/iroh/net/dialer/struct.Dialer.html +++ b/pr/2656/docs/iroh/net/dialer/struct.Dialer.html @@ -12,7 +12,7 @@

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.

source

pub fn endpoint(&self) -> &Endpoint

Returns a reference to the endpoint used in this dialer.

-

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.
§

fn node_id(&self) -> PublicKey

Get the node id of our node.
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
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§

fn node_id(&self) -> PublicKey

Get the node id of our node.
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/2656/docs/iroh/net/endpoint/enum.ConnectionError.html b/pr/2656/docs/iroh/net/endpoint/enum.ConnectionError.html index e38f647191..e9de7f3f05 100644 --- a/pr/2656/docs/iroh/net/endpoint/enum.ConnectionError.html +++ b/pr/2656/docs/iroh/net/endpoint/enum.ConnectionError.html @@ -20,7 +20,7 @@
§

LocallyClosed

The local application closed the connection

§

CidsExhausted

The connection could not be created because not enough of the CID space is available

Try using longer connection IDs.

-

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 +

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 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/2656/docs/iroh/net/endpoint/enum.ReadError.html b/pr/2656/docs/iroh/net/endpoint/enum.ReadError.html index 431dddd059..f372dbaf72 100644 --- a/pr/2656/docs/iroh/net/endpoint/enum.ReadError.html +++ b/pr/2656/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.
§

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 From<ResetError> for ReadError

§

fn from(e: ResetError) -> 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.
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 From<ResetError> for ReadError

§

fn from(e: ResetError) -> 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/2656/docs/iroh/net/endpoint/enum.WriteError.html b/pr/2656/docs/iroh/net/endpoint/enum.WriteError.html index 29dd4dc45a..cfafae7f58 100644 --- a/pr/2656/docs/iroh/net/endpoint/enum.WriteError.html +++ b/pr/2656/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<ClosedStream> for WriteError

§

fn from(_: ClosedStream) -> WriteError

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<StoppedError> for WriteError

§

fn from(x: StoppedError) -> 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 +

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<ClosedStream> for WriteError

§

fn from(_: ClosedStream) -> WriteError

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<StoppedError> for WriteError

§

fn from(x: StoppedError) -> 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 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/2656/docs/iroh/net/endpoint/struct.AddrInfo.html b/pr/2656/docs/iroh/net/endpoint/struct.AddrInfo.html index 06ecda2956..22499c8730 100644 --- a/pr/2656/docs/iroh/net/endpoint/struct.AddrInfo.html +++ b/pr/2656/docs/iroh/net/endpoint/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::AddrInfo

pub struct AddrInfo {
+AddrInfo in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::AddrInfo

source ·
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§

§

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.

+

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.

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§

§

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>( +

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

source§

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.
§

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 + __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 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
§

impl PartialEq for AddrInfo

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for AddrInfo

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for AddrInfo

source§

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
§

impl Eq for AddrInfo

§

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
source§

impl Eq for AddrInfo

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/endpoint/struct.Connection.html b/pr/2656/docs/iroh/net/endpoint/struct.Connection.html index 1464b52797..bc7c33ae18 100644 --- a/pr/2656/docs/iroh/net/endpoint/struct.Connection.html +++ b/pr/2656/docs/iroh/net/endpoint/struct.Connection.html @@ -110,7 +110,7 @@

pub fn set_max_concurrent_bi_streams(&self, count: VarInt)

Modify the number of remotely initiated bidirectional streams that may be concurrently open

No streams may be opened by the peer unless fewer than count are already open. Large counts increase both minimum and worst-case memory consumption.

-

Trait Implementations§

§

impl Clone for Connection

§

fn clone(&self) -> Connection

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 Connection

§

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

Formats the value using the given formatter. Read more
§

impl NeedsConn<Connection> for GetStateNeedsConn

§

fn proceed( +

Trait Implementations§

§

impl Clone for Connection

§

fn clone(&self) -> Connection

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 Connection

§

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

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

impl NeedsConn<Connection> for GetStateNeedsConn

source§

fn proceed( self, conn: Connection ) -> Pin<Box<dyn Future<Output = Result<Stats, FailureAction>>>>

Proceeds the download with the given connection.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2656/docs/iroh/net/endpoint/struct.NodeAddr.html b/pr/2656/docs/iroh/net/endpoint/struct.NodeAddr.html index 1d2015853a..04ee8c84eb 100644 --- a/pr/2656/docs/iroh/net/endpoint/struct.NodeAddr.html +++ b/pr/2656/docs/iroh/net/endpoint/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::NodeAddr

pub struct NodeAddr {
+NodeAddr in iroh::net::endpoint - Rust

Struct iroh::net::endpoint::NodeAddr

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

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

@@ -25,40 +25,40 @@ 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§

§

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( +

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( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

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

-

pub fn from_parts( +

source

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

Creates a new NodeAddr from its parts.

-

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

Applies the options to self.

+
source

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.

-

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>( +

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

source§

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
§

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

§

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

Converts to this type from the input type.
§

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

-
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
§

impl From<NodeTicket> for NodeAddr

§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<RemoteInfo> for NodeAddr

source§

fn from(info: RemoteInfo) -> 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 + __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<NodeAddr> for NodeTicket

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

+
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeTicket> for NodeAddr

source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

+
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<RemoteInfo> for NodeAddr

source§

fn from(info: RemoteInfo) -> 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 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
§

impl PartialEq for NodeAddr

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for NodeAddr

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for NodeAddr

source§

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
§

impl Eq for NodeAddr

§

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
source§

impl Eq for NodeAddr

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/endpoint/struct.VarInt.html b/pr/2656/docs/iroh/net/endpoint/struct.VarInt.html index 850393146c..3fe825ea0c 100644 --- a/pr/2656/docs/iroh/net/endpoint/struct.VarInt.html +++ b/pr/2656/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
§

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 +

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 __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
§

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

+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

§

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/2656/docs/iroh/net/key/enum.KeyParsingError.html b/pr/2656/docs/iroh/net/key/enum.KeyParsingError.html index 4044c2f0e0..9a5654fa12 100644 --- a/pr/2656/docs/iroh/net/key/enum.KeyParsingError.html +++ b/pr/2656/docs/iroh/net/key/enum.KeyParsingError.html @@ -1,10 +1,10 @@ -KeyParsingError in iroh::net::key - Rust

Enum iroh::net::key::KeyParsingError

pub enum KeyParsingError {
+KeyParsingError in iroh::net::key - Rust

Enum iroh::net::key::KeyParsingError

source ·
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§

§

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 +

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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/key/index.html b/pr/2656/docs/iroh/net/key/index.html index ddbe53c3db..225bfe5006 100644 --- a/pr/2656/docs/iroh/net/key/index.html +++ b/pr/2656/docs/iroh/net/key/index.html @@ -1,2 +1,2 @@ -iroh::net::key - Rust

Module iroh::net::key

Expand description

Cryptographic key handling for iroh-net.

+iroh::net::key - Rust

Module iroh::net::key

source ·
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/2656/docs/iroh/net/key/struct.PublicKey.html b/pr/2656/docs/iroh/net/key/struct.PublicKey.html index 310209dc35..827f008556 100644 --- a/pr/2656/docs/iroh/net/key/struct.PublicKey.html +++ b/pr/2656/docs/iroh/net/key/struct.PublicKey.html @@ -1,45 +1,45 @@ -PublicKey in iroh::net::key - Rust

Struct iroh::net::key::PublicKey

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

A public key.

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

Struct iroh::net::key::PublicKey

source ·
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§

§

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.

+

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.

§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.

-

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

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

+
source

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.

-

pub fn fmt_short(&self) -> String

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

source

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§

§

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>( +

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

source§

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
§

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.

+ 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.

Display is capable of serialising this format.

-
§

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 +
§

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 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 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,

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,

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
§

impl PartialEq for PublicKey

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for PublicKey

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for PublicKey

source§

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
§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

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

fn try_from( + 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( bytes: &[u8] -) -> 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( +) -> 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( bytes: &[u8; 32] -) -> 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 +) -> 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 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 @@ -167,7 +167,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>,

§

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

source§

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/2656/docs/iroh/net/key/struct.SecretKey.html b/pr/2656/docs/iroh/net/key/struct.SecretKey.html index b03cc44d06..e7bc50d783 100644 --- a/pr/2656/docs/iroh/net/key/struct.SecretKey.html +++ b/pr/2656/docs/iroh/net/key/struct.SecretKey.html @@ -1,24 +1,24 @@ -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 +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 R: CryptoRngCore + ?Sized,

Generate a new SecretKey with a randomness generator.

-

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 +

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 T: AsRef<[u8]>,

Deserialise this key from OpenSSH format.

-

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. +

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. The public part can always be recovered.

-

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>( +

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

source§

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
§

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>( + 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

source§

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
§

impl TryFrom<&[u8]> for SecretKey

§

type Error = Error

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

fn try_from( + 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( 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/2656/docs/iroh/net/key/struct.SharedSecret.html b/pr/2656/docs/iroh/net/key/struct.SharedSecret.html index cb728a9b2a..98e20795b1 100644 --- a/pr/2656/docs/iroh/net/key/struct.SharedSecret.html +++ b/pr/2656/docs/iroh/net/key/struct.SharedSecret.html @@ -1,7 +1,7 @@ -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 +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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/key/type.NodeId.html b/pr/2656/docs/iroh/net/key/type.NodeId.html index 5f892ae8dc..b4d9870ae0 100644 --- a/pr/2656/docs/iroh/net/key/type.NodeId.html +++ b/pr/2656/docs/iroh/net/key/type.NodeId.html @@ -1,4 +1,4 @@ -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.

+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.

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/2656/docs/iroh/net/metrics/struct.MagicsockMetrics.html b/pr/2656/docs/iroh/net/metrics/struct.MagicsockMetrics.html index 0aa9781ad8..40cac6b577 100644 --- a/pr/2656/docs/iroh/net/metrics/struct.MagicsockMetrics.html +++ b/pr/2656/docs/iroh/net/metrics/struct.MagicsockMetrics.html @@ -1,55 +1,55 @@ MagicsockMetrics in iroh::net::metrics - Rust

Struct iroh::net::metrics::MagicsockMetrics

source ·
pub struct MagicsockMetrics {
Show 41 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 recv_gro_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 recv_gro_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.

-
§recv_gro_datagrams: Counter

Number of datagrams received using GRO

-
§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 +

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.

+
§recv_gro_datagrams: Counter

Number of datagrams received using GRO

+
§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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/metrics/struct.NetcheckMetrics.html b/pr/2656/docs/iroh/net/metrics/struct.NetcheckMetrics.html index fc0fa5cc6a..40ba4d8ddb 100644 --- a/pr/2656/docs/iroh/net/metrics/struct.NetcheckMetrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/metrics/struct.PortmapMetrics.html b/pr/2656/docs/iroh/net/metrics/struct.PortmapMetrics.html index cb9a5fb806..a9b8478da1 100644 --- a/pr/2656/docs/iroh/net/metrics/struct.PortmapMetrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/metrics/struct.RelayMetrics.html b/pr/2656/docs/iroh/net/metrics/struct.RelayMetrics.html index c7340a6108..4364839316 100644 --- a/pr/2656/docs/iroh/net/metrics/struct.RelayMetrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/netcheck/struct.Metrics.html b/pr/2656/docs/iroh/net/netcheck/struct.Metrics.html index 5b6c5474cf..99844286b5 100644 --- a/pr/2656/docs/iroh/net/netcheck/struct.Metrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/portmapper/struct.Metrics.html b/pr/2656/docs/iroh/net/portmapper/struct.Metrics.html index 2800269aa5..8fa55894ef 100644 --- a/pr/2656/docs/iroh/net/portmapper/struct.Metrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/relay/server/struct.Metrics.html b/pr/2656/docs/iroh/net/relay/server/struct.Metrics.html index 8f3aa3feb1..e0dad7abf1 100644 --- a/pr/2656/docs/iroh/net/relay/server/struct.Metrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/relay/struct.RelayUrl.html b/pr/2656/docs/iroh/net/relay/struct.RelayUrl.html index 6f27886824..7cad62662c 100644 --- a/pr/2656/docs/iroh/net/relay/struct.RelayUrl.html +++ b/pr/2656/docs/iroh/net/relay/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh::net::relay - Rust

Struct iroh::net::relay::RelayUrl

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

A URL identifying a relay server.

+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.

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§

§

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.

+

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.

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.
§

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

Dereferences the value.
§

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

§

fn deserialize<__D>( +

§

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

source§

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
§

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.

+ __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.

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.
§

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 +
§

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 __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 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,

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,

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
§

impl PartialEq for RelayUrl

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for RelayUrl

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for RelayUrl

source§

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
§

impl Eq for RelayUrl

§

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
source§

impl Eq for RelayUrl

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/struct.AddrInfo.html b/pr/2656/docs/iroh/net/struct.AddrInfo.html index f6bdea8fa6..5de0cb642d 100644 --- a/pr/2656/docs/iroh/net/struct.AddrInfo.html +++ b/pr/2656/docs/iroh/net/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh::net - Rust

Struct iroh::net::AddrInfo

pub struct AddrInfo {
+AddrInfo in iroh::net - Rust

Struct iroh::net::AddrInfo

source ·
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§

§

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.

+

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.

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§

§

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>( +

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

source§

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.
§

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 + __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 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
§

impl PartialEq for AddrInfo

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for AddrInfo

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for AddrInfo

source§

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
§

impl Eq for AddrInfo

§

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
source§

impl Eq for AddrInfo

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/struct.NodeAddr.html b/pr/2656/docs/iroh/net/struct.NodeAddr.html index 2f48aacf07..e57e8c98d1 100644 --- a/pr/2656/docs/iroh/net/struct.NodeAddr.html +++ b/pr/2656/docs/iroh/net/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh::net - Rust

Struct iroh::net::NodeAddr

pub struct NodeAddr {
+NodeAddr in iroh::net - Rust

Struct iroh::net::NodeAddr

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

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

@@ -25,40 +25,40 @@ 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§

§

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( +

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( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

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

-

pub fn from_parts( +

source

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

Creates a new NodeAddr from its parts.

-

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

Applies the options to self.

+
source

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.

-

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>( +

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

source§

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
§

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

§

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

Converts to this type from the input type.
§

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

-
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
§

impl From<NodeTicket> for NodeAddr

§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<RemoteInfo> for NodeAddr

source§

fn from(info: RemoteInfo) -> 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 + __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<NodeAddr> for NodeTicket

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

+
source§

impl From<NodeInfo> for NodeAddr

source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
source§

impl From<NodeTicket> for NodeAddr

source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

+
source§

impl From<PublicKey> for NodeAddr

source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
source§

impl From<RemoteInfo> for NodeAddr

source§

fn from(info: RemoteInfo) -> 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 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
§

impl PartialEq for NodeAddr

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for NodeAddr

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for NodeAddr

source§

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
§

impl Eq for NodeAddr

§

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
source§

impl Eq for NodeAddr

source§

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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/ticket/struct.NodeTicket.html b/pr/2656/docs/iroh/net/ticket/struct.NodeTicket.html index 59d2163818..bc48bdb126 100644 --- a/pr/2656/docs/iroh/net/ticket/struct.NodeTicket.html +++ b/pr/2656/docs/iroh/net/ticket/struct.NodeTicket.html @@ -1,4 +1,4 @@ -NodeTicket in iroh::net::ticket - Rust

Struct iroh::net::ticket::NodeTicket

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

A token containing information for establishing a connection to a node.

+NodeTicket in iroh::net::ticket - Rust

Struct iroh::net::ticket::NodeTicket

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

A token containing information for establishing a connection to a node.

Contains

  • The NodeId of the node to connect to (a 32-byte ed25519 public key).
  • @@ -8,20 +8,20 @@

    This allows establishing a connection to the node in most circumstances where it is possible to do so.

    This NodeTicket is a single item which can be easily serialized and deserialized.

    -

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>( +

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

source§

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
§

impl Display for NodeTicket

§

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

Formats the value using the given formatter. Read more
§

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

-
§

impl From<NodeTicket> for NodeAddr

§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
§

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 + 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 From<NodeAddr> for NodeTicket

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

+
source§

impl From<NodeTicket> for NodeAddr

source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

+
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 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 Serialize for NodeTicket

§

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

source§

impl Serialize for NodeTicket

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh/net/type.NodeId.html b/pr/2656/docs/iroh/net/type.NodeId.html index 465789c866..84cde2f4a7 100644 --- a/pr/2656/docs/iroh/net/type.NodeId.html +++ b/pr/2656/docs/iroh/net/type.NodeId.html @@ -1,4 +1,4 @@ -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.

+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.

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/2656/docs/iroh_blobs/downloader/struct.DownloadRequest.html b/pr/2656/docs/iroh_blobs/downloader/struct.DownloadRequest.html index ca1dc68bcf..6edff79a2e 100644 --- a/pr/2656/docs/iroh_blobs/downloader/struct.DownloadRequest.html +++ b/pr/2656/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/2656/docs/iroh_blobs/downloader/struct.Downloader.html b/pr/2656/docs/iroh_blobs/downloader/struct.Downloader.html index cb2b310a41..4d93aeab3b 100644 --- a/pr/2656/docs/iroh_blobs/downloader/struct.Downloader.html +++ b/pr/2656/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 certain nodes can be used to download a hash.

+
source

pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)

Declare that certain 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/2656/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2656/docs/iroh_blobs/downloader/trait.Dialer.html index 8d8f526fa5..3438f607f4 100644 --- a/pr/2656/docs/iroh_blobs/downloader/trait.Dialer.html +++ b/pr/2656/docs/iroh_blobs/downloader/trait.Dialer.html @@ -1,15 +1,15 @@ -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 + 'static;
 
     // 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 node_id(&self) -> NodeId;
+    fn is_pending(&self, node: NodeId) -> bool;
+    fn node_id(&self) -> NodeId;
 }
Expand description

Trait modeling a dialer. This allows for IO-less testing.

Required Associated Types§

source

type Connection: Clone + 'static

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.

-
source

fn node_id(&self) -> NodeId

Get the node id of our node.

-

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

source§

fn node_id(&self) -> NodeId

Implementors§

\ No newline at end of file +

source

fn is_pending(&self, node: NodeId) -> bool

Check if a node is being dialed.

+
source

fn node_id(&self) -> NodeId

Get the node id of our node.

+

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

source§

fn node_id(&self) -> NodeId

Implementors§

\ No newline at end of file diff --git a/pr/2656/docs/iroh_blobs/enum.BlobFormat.html b/pr/2656/docs/iroh_blobs/enum.BlobFormat.html index b3537141a3..321167fa09 100644 --- a/pr/2656/docs/iroh_blobs/enum.BlobFormat.html +++ b/pr/2656/docs/iroh_blobs/enum.BlobFormat.html @@ -1,30 +1,30 @@ -BlobFormat in iroh_blobs - Rust

Enum iroh_blobs::BlobFormat

pub enum BlobFormat {
+BlobFormat in iroh_blobs - Rust

Enum iroh_blobs::BlobFormat

source ·
pub enum BlobFormat {
     Raw,
     HashSeq,
 }
Expand description

A format identifier

Variants§

§

Raw

Raw blob

§

HashSeq

A sequence of BLAKE3 hashes

-

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>( +

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

source§

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
§

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 + __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 __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 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,

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,

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
§

impl PartialEq for BlobFormat

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for BlobFormat

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for BlobFormat

source§

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
§

impl Copy for BlobFormat

§

impl Eq for BlobFormat

§

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
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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2656/docs/iroh_blobs/export/enum.ExportProgress.html index 9e768a3e6e..d8e7165d48 100644 --- a/pr/2656/docs/iroh_blobs/export/enum.ExportProgress.html +++ b/pr/2656/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/2656/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2656/docs/iroh_blobs/get/db/enum.DownloadProgress.html index 12ef56ac5d..374a5163e9 100644 --- a/pr/2656/docs/iroh_blobs/get/db/enum.DownloadProgress.html +++ b/pr/2656/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/2656/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2656/docs/iroh_blobs/metrics/struct.Metrics.html index 493414644a..0026c07230 100644 --- a/pr/2656/docs/iroh_blobs/metrics/struct.Metrics.html +++ b/pr/2656/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.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

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.
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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2656/docs/iroh_blobs/provider/enum.AddProgress.html index 3e952fa7cf..5e58a9b301 100644 --- a/pr/2656/docs/iroh_blobs/provider/enum.AddProgress.html +++ b/pr/2656/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/2656/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2656/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html index 749ec5d972..4ba5c8d0cc 100644 --- a/pr/2656/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html +++ b/pr/2656/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html @@ -8,7 +8,7 @@ Done { hash: Hash, }, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the batch add operation.

Variants§

§

Found

An item was found with the given size

Fields

§size: u64

The size of the entry in bytes.

@@ -16,7 +16,7 @@

Fields

§offset: u64

The offset of the progress, in bytes.

§

Done

We are done, and the hash is hash.

Fields

§hash: Hash

The hash of the entry.

-
§

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 BatchAddPathProgress

source§

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

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

impl<'de> Deserialize<'de> for BatchAddPathProgress

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 BatchAddPathProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/pr/2656/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2656/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html index e83e6eee47..a178d09dc1 100644 --- a/pr/2656/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html +++ b/pr/2656/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/2656/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2656/docs/iroh_blobs/store/enum.ValidateProgress.html index 7bbb9311cd..3fd8bbeaa3 100644 --- a/pr/2656/docs/iroh_blobs/store/enum.ValidateProgress.html +++ b/pr/2656/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/2656/docs/iroh_blobs/struct.Hash.html b/pr/2656/docs/iroh_blobs/struct.Hash.html index d0e62f13d7..05b45be943 100644 --- a/pr/2656/docs/iroh_blobs/struct.Hash.html +++ b/pr/2656/docs/iroh_blobs/struct.Hash.html @@ -1,36 +1,36 @@ -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 +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 representation of the 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>( +

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

source§

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
§

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 + 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 __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 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,

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,

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
§

impl PartialEq for Hash

§

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

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 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 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 <= +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 <= 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
§

impl Serialize for Hash

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for Hash

source§

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
§

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 + 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 Hash: 'a,

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

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

source§

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
§

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 + 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 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/2656/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2656/docs/iroh_blobs/struct.HashAndFormat.html index bbbab68743..03e00e1367 100644 --- a/pr/2656/docs/iroh_blobs/struct.HashAndFormat.html +++ b/pr/2656/docs/iroh_blobs/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh_blobs - Rust

Struct iroh_blobs::HashAndFormat

pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust

Struct iroh_blobs::HashAndFormat

source ·
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§

§

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>( +

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

source§

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
§

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 + 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 __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 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,

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,

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
§

impl PartialEq for HashAndFormat

§

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
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 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 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 <= +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 <= 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
§

impl Serialize for HashAndFormat

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for HashAndFormat

source§

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
§

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 + 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 HashAndFormat: 'a,

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

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

source§

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
§

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 + 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 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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2656/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2656/docs/iroh_docs/actor/struct.SyncHandle.html index 1502983745..f0b841699a 100644 --- a/pr/2656/docs/iroh_docs/actor/struct.SyncHandle.html +++ b/pr/2656/docs/iroh_docs/actor/struct.SyncHandle.html @@ -26,7 +26,7 @@ namespace: NamespaceId, author: AuthorId, key: Bytes, - hash: Hash, + hash: Hash, len: u64 ) -> Result<()>

source

pub async fn delete_prefix( &self, diff --git a/pr/2656/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2656/docs/iroh_docs/engine/enum.LiveEvent.html index 694b1b890d..3f7a52a177 100644 --- a/pr/2656/docs/iroh_docs/engine/enum.LiveEvent.html +++ b/pr/2656/docs/iroh_docs/engine/enum.LiveEvent.html @@ -3,34 +3,34 @@ entry: Entry, }, InsertRemote { - from: PublicKey, + from: PublicKey, entry: Entry, content_status: ContentStatus, }, ContentReady { - hash: Hash, + hash: Hash, }, PendingContentReady, - NeighborUp(PublicKey), - NeighborDown(PublicKey), + NeighborUp(PublicKey), + NeighborDown(PublicKey), SyncFinished(SyncEvent), }
Expand description

Events informing about actions of the live sync progress.

Variants§

§

InsertLocal

A local insertion.

Fields

§entry: Entry

The inserted entry.

§

InsertRemote

Received a remote insert.

-

Fields

§from: PublicKey

The peer that sent us the entry.

+

Fields

§from: PublicKey

The peer that sent us the entry.

§entry: Entry

The inserted entry.

§content_status: ContentStatus

If the content is available at the local node

§

ContentReady

The content of an entry was downloaded and is now available at the local node

-

Fields

§hash: Hash

The content hash of the newly available entry content

+

Fields

§hash: Hash

The content hash of the newly available entry content

§

PendingContentReady

All pending content is now ready.

This event signals that all queued content downloads from the last sync run have either completed or failed.

It will only be emitted after a Self::SyncFinished event, never before.

Receiving this event does not guarantee that all content in the document is available. If blobs failed to download, this event will still be emitted after all operations completed.

-
§

NeighborUp(PublicKey)

We have a new neighbor in the swarm.

-
§

NeighborDown(PublicKey)

We lost a neighbor in the swarm.

+
§

NeighborUp(PublicKey)

We have a new neighbor in the swarm.

+
§

NeighborDown(PublicKey)

We lost a neighbor in the swarm.

§

SyncFinished(SyncEvent)

A set-reconciliation sync finished.

Trait Implementations§

source§

impl Clone for LiveEvent

source§

fn clone(&self) -> LiveEvent

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 LiveEvent

source§

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

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

impl<'de> Deserialize<'de> for LiveEvent

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 Display for LiveEvent

source§

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

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

impl PartialEq for LiveEvent

source§

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

This method tests for self and other values to be equal, and is used diff --git a/pr/2656/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2656/docs/iroh_docs/engine/fn.entry_to_content_status.html index 99e68cb3cb..2eb885ca1d 100644 --- a/pr/2656/docs/iroh_docs/engine/fn.entry_to_content_status.html +++ b/pr/2656/docs/iroh_docs/engine/fn.entry_to_content_status.html @@ -1,2 +1,2 @@ -entry_to_content_status in iroh_docs::engine - Rust

Function iroh_docs::engine::entry_to_content_status

source ·
pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description

Converts an [EntryStatus] into a [‘ContentStatus’].

+entry_to_content_status in iroh_docs::engine - Rust

Function iroh_docs::engine::entry_to_content_status

source ·
pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description

Converts an EntryStatus into a [‘ContentStatus’].

\ No newline at end of file diff --git a/pr/2656/docs/iroh_docs/engine/index.html b/pr/2656/docs/iroh_docs/engine/index.html index f2ade98b95..1bd1a5206c 100644 --- a/pr/2656/docs/iroh_docs/engine/index.html +++ b/pr/2656/docs/iroh_docs/engine/index.html @@ -1,4 +1,4 @@ iroh_docs::engine - Rust

Module iroh_docs::engine

source ·
Expand description

Handlers and actors to for live syncing replicas.

crate::Replica is also called documents here.

Structs§

  • Persistent default author for a docs engine.
  • The sync engine coordinates actors that manage open documents, set-reconciliation syncs with -peers and a gossip swarm for each syncing document.
  • Event emitted when a sync operation completes

Enums§

Functions§

\ No newline at end of file +peers and a gossip swarm for each syncing document.
  • Event emitted when a sync operation completes
  • Enums§

    Functions§

    \ No newline at end of file diff --git a/pr/2656/docs/iroh_docs/engine/struct.Engine.html b/pr/2656/docs/iroh_docs/engine/struct.Engine.html index 2e1b52890b..f581dea9db 100644 --- a/pr/2656/docs/iroh_docs/engine/struct.Engine.html +++ b/pr/2656/docs/iroh_docs/engine/struct.Engine.html @@ -8,12 +8,12 @@

    Fields§

    §endpoint: Endpoint

    Endpoint used by the engine.

    §sync: SyncHandle

    Handle to the actor thread.

    §default_author: Arc<DefaultAuthor>

    The persistent default author for this engine.

    -

    Implementations§

    source§

    impl Engine

    source

    pub async fn spawn<B: Store>( +

    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, + downloader: Downloader, default_author_storage: DefaultAuthorStorage ) -> Result<Self>

    Start the sync engine.

    This will spawn two tokio tasks for the live sync coordination and gossip actors, and a @@ -21,7 +21,7 @@

    source

    pub async fn start_sync( &self, namespace: NamespaceId, - peers: Vec<NodeAddr> + peers: Vec<NodeAddr> ) -> Result<()>

    Start to sync a document.

    If peers is non-empty, it will both do an initial set-reconciliation sync with each peer, and join an iroh-gossip swarm with these peers to receive and broadcast document updates.

    diff --git a/pr/2656/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2656/docs/iroh_docs/engine/struct.SyncEvent.html index e6f6f9855e..5bbc9a06c8 100644 --- a/pr/2656/docs/iroh_docs/engine/struct.SyncEvent.html +++ b/pr/2656/docs/iroh_docs/engine/struct.SyncEvent.html @@ -1,11 +1,11 @@ SyncEvent in iroh_docs::engine - Rust

    Struct iroh_docs::engine::SyncEvent

    source ·
    pub struct SyncEvent {
    -    pub peer: PublicKey,
    +    pub peer: PublicKey,
         pub origin: Origin,
         pub finished: SystemTime,
         pub started: SystemTime,
         pub result: Result<SyncDetails, String>,
     }
    Expand description

    Event emitted when a sync operation completes

    -

    Fields§

    §peer: PublicKey

    Peer we synced with

    +

    Fields§

    §peer: PublicKey

    Peer we synced with

    §origin: Origin

    Origin of the sync exchange

    §finished: SystemTime

    Timestamp when the sync started

    §started: SystemTime

    Timestamp when the sync finished

    diff --git a/pr/2656/docs/iroh_docs/index.html b/pr/2656/docs/iroh_docs/index.html index b0475e2bfc..6e258ec502 100644 --- a/pr/2656/docs/iroh_docs/index.html +++ b/pr/2656/docs/iroh_docs/index.html @@ -1,7 +1,7 @@ iroh_docs - Rust

    Crate iroh_docs

    source ·
    Expand description

    Multi-dimensional key-value documents with an efficient synchronization protocol

    The crate operates on Replicas. A replica contains an unlimited number of Entries. Each entry is identified by a key, its author, and the replica’s -namespace. Its value is the 32-byte BLAKE3 hash +namespace. Its value is the 32-byte BLAKE3 hash of the entry’s content data, the size of this content data, and a timestamp. The content data itself is not stored or transferred through a replica.

    All entries in a replica are signed with two keypairs:

    diff --git a/pr/2656/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2656/docs/iroh_docs/metrics/struct.Metrics.html index ddb7a44ecf..5c75c317b5 100644 --- a/pr/2656/docs/iroh_docs/metrics/struct.Metrics.html +++ b/pr/2656/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

    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§

    §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

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_docs/net/enum.AcceptError.html b/pr/2656/docs/iroh_docs/net/enum.AcceptError.html index 03058d2c4d..ce05bef521 100644 --- a/pr/2656/docs/iroh_docs/net/enum.AcceptError.html +++ b/pr/2656/docs/iroh_docs/net/enum.AcceptError.html @@ -3,31 +3,31 @@ error: Error, }, Open { - peer: PublicKey, + peer: PublicKey, error: Error, }, Abort { - peer: PublicKey, + peer: PublicKey, namespace: NamespaceId, reason: AbortReason, }, Sync { - peer: PublicKey, + peer: PublicKey, namespace: Option<NamespaceId>, error: Error, }, Close { - peer: PublicKey, + peer: PublicKey, namespace: Option<NamespaceId>, error: Error, }, }
    Expand description

    Errors that may occur on handling incoming sync connections.

    Variants§

    §

    Connect

    Failed to establish connection

    Fields

    §error: Error
    §

    Open

    Failed to open replica

    -

    Fields

    §peer: PublicKey
    §error: Error
    §

    Abort

    We aborted the sync request.

    -

    Fields

    §peer: PublicKey
    §namespace: NamespaceId
    §

    Sync

    Failed to run sync

    -

    Fields

    §peer: PublicKey
    §namespace: Option<NamespaceId>
    §error: Error
    §

    Close

    Failed to close

    -

    Fields

    §peer: PublicKey
    §namespace: Option<NamespaceId>
    §error: Error

    Implementations§

    source§

    impl AcceptError

    source

    pub fn peer(&self) -> Option<PublicKey>

    Get the peer’s node ID (if available)

    +

    Fields

    §error: Error
    §

    Abort

    We aborted the sync request.

    +

    Fields

    §namespace: NamespaceId
    §

    Sync

    Failed to run sync

    +

    Fields

    §namespace: Option<NamespaceId>
    §error: Error
    §

    Close

    Failed to close

    +

    Fields

    §namespace: Option<NamespaceId>
    §error: Error

    Implementations§

    source§

    impl AcceptError

    source

    pub fn peer(&self) -> Option<PublicKey>

    Get the peer’s node ID (if available)

    source

    pub fn namespace(&self) -> Option<NamespaceId>

    Get the namespace (if available)

    Trait Implementations§

    source§

    impl Debug for AcceptError

    source§

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

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

    impl Display for AcceptError

    source§

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

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

    impl Error for AcceptError

    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 diff --git a/pr/2656/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2656/docs/iroh_docs/net/fn.connect_and_sync.html index 59fde4d862..98a8f0c674 100644 --- a/pr/2656/docs/iroh_docs/net/fn.connect_and_sync.html +++ b/pr/2656/docs/iroh_docs/net/fn.connect_and_sync.html @@ -2,6 +2,6 @@ endpoint: &Endpoint, sync: &SyncHandle, namespace: NamespaceId, - peer: NodeAddr + peer: NodeAddr ) -> Result<SyncFinished, ConnectError>
    Expand description

    Connect to a peer and sync a replica

    \ No newline at end of file diff --git a/pr/2656/docs/iroh_docs/net/fn.handle_connection.html b/pr/2656/docs/iroh_docs/net/fn.handle_connection.html index ab2a5b24b4..0c9e7c06c2 100644 --- a/pr/2656/docs/iroh_docs/net/fn.handle_connection.html +++ b/pr/2656/docs/iroh_docs/net/fn.handle_connection.html @@ -3,6 +3,6 @@ connecting: Connecting, accept_cb: F ) -> Result<SyncFinished, AcceptError>
    where - F: Fn(NamespaceId, PublicKey) -> Fut, + F: Fn(NamespaceId, PublicKey) -> Fut, Fut: Future<Output = AcceptOutcome>,
    Expand description

    Handle an iroh-docs connection and sync all shared documents in the replica store.

    \ No newline at end of file diff --git a/pr/2656/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2656/docs/iroh_docs/net/struct.SyncFinished.html index 6388baa601..b7c788f9f2 100644 --- a/pr/2656/docs/iroh_docs/net/struct.SyncFinished.html +++ b/pr/2656/docs/iroh_docs/net/struct.SyncFinished.html @@ -1,11 +1,11 @@ SyncFinished in iroh_docs::net - Rust

    Struct iroh_docs::net::SyncFinished

    source ·
    pub struct SyncFinished {
         pub namespace: NamespaceId,
    -    pub peer: PublicKey,
    +    pub peer: PublicKey,
         pub outcome: SyncOutcome,
         pub timings: Timings,
     }
    Expand description

    Details of a finished sync operation.

    Fields§

    §namespace: NamespaceId

    The namespace that was synced.

    -
    §peer: PublicKey

    The peer we syned with.

    +
    §peer: PublicKey

    The peer we syned with.

    §outcome: SyncOutcome

    The outcome of the sync operation

    §timings: Timings

    The time this operation took

    Trait Implementations§

    source§

    impl Clone for SyncFinished

    source§

    fn clone(&self) -> SyncFinished

    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 SyncFinished

    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/2656/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2656/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html index 67ce143f48..36e5ef796b 100644 --- a/pr/2656/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html +++ b/pr/2656/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html @@ -6,7 +6,7 @@

    Implementations§

    source§

    impl ContentHashesIterator

    source

    pub fn all( table: &ReadOnlyTable<(&'static [u8; 32], &'static [u8; 32], &'static [u8]), (u64, &'static [u8; 64], &'static [u8; 64], u64, &'static [u8; 32])> ) -> Result<Self>

    Create a new iterator over all content hashes.

    -

    Trait Implementations§

    source§

    impl Debug for ContentHashesIterator

    source§

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

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

    impl Iterator for ContentHashesIterator

    §

    type Item = Result<Hash, Error>

    The type of the elements being iterated over.
    source§

    fn next(&mut self) -> Option<Self::Item>

    Advances the iterator and returns the next value. Read more
    source§

    fn next_chunk<const N: usize>( +

    Trait Implementations§

    source§

    impl Debug for ContentHashesIterator

    source§

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

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

    impl Iterator for ContentHashesIterator

    §

    type Item = Result<Hash, Error>

    The type of the elements being iterated over.
    source§

    fn next(&mut self) -> Option<Self::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/2656/docs/iroh_docs/struct.AuthorId.html b/pr/2656/docs/iroh_docs/struct.AuthorId.html index 11193a8a1d..1fd1969358 100644 --- a/pr/2656/docs/iroh_docs/struct.AuthorId.html +++ b/pr/2656/docs/iroh_docs/struct.AuthorId.html @@ -149,6 +149,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>,

    §

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

    source§

    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/2656/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2656/docs/iroh_docs/struct.AuthorPublicKey.html index daed645fc1..f2f8c7b41d 100644 --- a/pr/2656/docs/iroh_docs/struct.AuthorPublicKey.html +++ b/pr/2656/docs/iroh_docs/struct.AuthorPublicKey.html @@ -141,6 +141,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>,

    §

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

    source§

    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/2656/docs/iroh_docs/struct.DocTicket.html b/pr/2656/docs/iroh_docs/struct.DocTicket.html index 83586dccee..62144035f9 100644 --- a/pr/2656/docs/iroh_docs/struct.DocTicket.html +++ b/pr/2656/docs/iroh_docs/struct.DocTicket.html @@ -1,13 +1,13 @@ DocTicket in iroh_docs - Rust

    Struct iroh_docs::DocTicket

    source ·
    pub struct DocTicket {
         pub capability: Capability,
    -    pub nodes: Vec<NodeAddr>,
    +    pub nodes: Vec<NodeAddr>,
     }
    Expand description

    Contains both a key (either secret or public) to a document, and a list of peers to join.

    Fields§

    §capability: Capability

    either a public or private key

    -
    §nodes: Vec<NodeAddr>

    A list of nodes to contact.

    -

    Implementations§

    source§

    impl DocTicket

    source

    pub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self

    Create a new doc ticket

    +
    §nodes: Vec<NodeAddr>

    A list of nodes to contact.

    +

    Implementations§

    source§

    impl DocTicket

    source

    pub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self

    Create a new doc ticket

    Trait Implementations§

    source§

    impl Clone for DocTicket

    source§

    fn clone(&self) -> DocTicket

    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 DocTicket

    source§

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

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

    impl<'de> Deserialize<'de> for DocTicket

    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 Display for DocTicket

    source§

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

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

    impl FromStr for DocTicket

    §

    type Err = Error

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

    fn from_str(s: &str) -> Result<Self, Self::Err>

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

    impl Serialize for DocTicket

    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
    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<Self, 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 + __D: Deserializer<'de>,

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

    impl Display for DocTicket

    source§

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

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

    impl FromStr for DocTicket

    §

    type Err = Error

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

    fn from_str(s: &str) -> Result<Self, Self::Err>

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

    impl Serialize for DocTicket

    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
    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<Self, 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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_docs/struct.NamespaceId.html b/pr/2656/docs/iroh_docs/struct.NamespaceId.html index 60e864ca61..c4565e6ef6 100644 --- a/pr/2656/docs/iroh_docs/struct.NamespaceId.html +++ b/pr/2656/docs/iroh_docs/struct.NamespaceId.html @@ -149,6 +149,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>,

    §

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

    source§

    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/2656/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2656/docs/iroh_docs/struct.NamespacePublicKey.html index 1128cb15ed..d3dece8fcd 100644 --- a/pr/2656/docs/iroh_docs/struct.NamespacePublicKey.html +++ b/pr/2656/docs/iroh_docs/struct.NamespacePublicKey.html @@ -140,6 +140,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>,

    §

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

    source§

    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/2656/docs/iroh_docs/sync/struct.Entry.html b/pr/2656/docs/iroh_docs/sync/struct.Entry.html index 8c9671fdb2..29c03d07b6 100644 --- a/pr/2656/docs/iroh_docs/sync/struct.Entry.html +++ b/pr/2656/docs/iroh_docs/sync/struct.Entry.html @@ -1,6 +1,6 @@ Entry in iroh_docs::sync - Rust

    Struct iroh_docs::sync::Entry

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

    A single entry in a Replica

    An entry is identified by a key, its Author, and the Replica’s -NamespaceSecret. Its value is the 32-byte BLAKE3 hash +NamespaceSecret. Its value is the 32-byte BLAKE3 hash of the entry’s content data, the size of this content data, and a timestamp.

    Implementations§

    source§

    impl Entry

    source

    pub fn new(id: RecordIdentifier, record: Record) -> Self

    Create a new entry

    source

    pub fn new_empty(id: RecordIdentifier) -> Self

    Create a new empty entry with the current timestamp.

    @@ -15,7 +15,7 @@
    source

    pub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry

    Sign this entry with a NamespaceSecret and Author.

    Methods from Deref<Target = Record>§

    source

    pub fn is_empty(&self) -> bool

    Return true if the entry is empty.

    source

    pub fn content_len(&self) -> u64

    Get the length of the data addressed by this record’s content hash.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the [struct@Hash] of the content data of this record.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the Hash of the content data of this record.

    source

    pub fn timestamp(&self) -> u64

    Get the timestamp of this record.

    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

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

    impl Deref for Entry

    §

    type Target = Record

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    source§

    impl<'de> Deserialize<'de> for Entry

    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<SignedEntry> for Entry

    source§

    fn from(value: SignedEntry) -> Self

    Converts to this type from the input type.
    source§

    impl Ord for Entry

    source§

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

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

    fn max(self, other: Self) -> Self
    where diff --git a/pr/2656/docs/iroh_docs/sync/struct.Record.html b/pr/2656/docs/iroh_docs/sync/struct.Record.html index 1de853c80d..9492776ae1 100644 --- a/pr/2656/docs/iroh_docs/sync/struct.Record.html +++ b/pr/2656/docs/iroh_docs/sync/struct.Record.html @@ -1,11 +1,11 @@ Record in iroh_docs::sync - Rust

    Struct iroh_docs::sync::Record

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

    The data part of an entry in a Replica.

    -

    Implementations§

    source§

    impl Record

    source

    pub fn new(hash: Hash, len: u64, timestamp: u64) -> Self

    Create a new record.

    +

    Implementations§

    source§

    impl Record

    source

    pub fn new(hash: Hash, len: u64, timestamp: u64) -> Self

    Create a new record.

    source

    pub fn empty(timestamp: u64) -> Self

    Create a tombstone record (empty content)

    source

    pub fn empty_current() -> Self

    Create a tombstone record with the timestamp set to now.

    source

    pub fn is_empty(&self) -> bool

    Return true if the entry is empty.

    -
    source

    pub fn new_current(hash: Hash, len: u64) -> Self

    Create a new Record with the timestamp set to now.

    +
    source

    pub fn new_current(hash: Hash, len: u64) -> Self

    Create a new Record with the timestamp set to now.

    source

    pub fn content_len(&self) -> u64

    Get the length of the data addressed by this record’s content hash.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the [struct@Hash] of the content data of this record.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the Hash of the content data of this record.

    source

    pub fn timestamp(&self) -> u64

    Get the timestamp of this record.

    Trait Implementations§

    source§

    impl Clone for Record

    source§

    fn clone(&self) -> Record

    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 Record

    source§

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

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

    impl<'de> Deserialize<'de> for Record

    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 Record

    Ordering for entry values.

    diff --git a/pr/2656/docs/iroh_docs/sync/struct.Replica.html b/pr/2656/docs/iroh_docs/sync/struct.Replica.html index 0835bb5ecc..c42b26b33c 100644 --- a/pr/2656/docs/iroh_docs/sync/struct.Replica.html +++ b/pr/2656/docs/iroh_docs/sync/struct.Replica.html @@ -5,7 +5,7 @@ &mut self, key: impl AsRef<[u8]>, author: &Author, - hash: Hash, + hash: Hash, len: u64 ) -> Result<usize, InsertError>

    Insert a new record at the given key.

    The entry will by signed by the provided author. @@ -35,7 +35,7 @@ key: impl AsRef<[u8]>, author: &Author, data: impl AsRef<[u8]> -) -> Result<Hash, InsertError>

    Hashes the given data and inserts it.

    +) -> Result<Hash, InsertError>

    Hashes the given data and inserts it.

    This does not store the content, just the record of it. Returns the calculated hash.

    source

    pub fn record_id( diff --git a/pr/2656/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2656/docs/iroh_docs/sync/struct.SignedEntry.html index 61d437fe88..dbd62d7ccc 100644 --- a/pr/2656/docs/iroh_docs/sync/struct.SignedEntry.html +++ b/pr/2656/docs/iroh_docs/sync/struct.SignedEntry.html @@ -14,7 +14,7 @@

    source

    pub fn signature(&self) -> &EntrySignature

    Get the signature.

    source

    pub fn validate_empty(&self) -> Result<(), ValidationFailure>

    Validate that the entry has the empty hash if the length is 0, or a non-zero length.

    source

    pub fn entry(&self) -> &Entry

    Get the Entry.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the content [struct@Hash] of the entry.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the content Hash of the entry.

    source

    pub fn content_len(&self) -> u64

    Get the content length of the entry.

    source

    pub fn author_bytes(&self) -> AuthorId

    Get the author bytes of this entry.

    source

    pub fn key(&self) -> &[u8]

    Get the key of the entry.

    @@ -29,7 +29,7 @@
    source

    pub fn to_vec(&self) -> Vec<u8>

    Serialize this entry into a new vector with its canonical byte representation.

    Methods from Deref<Target = Record>§

    source

    pub fn is_empty(&self) -> bool

    Return true if the entry is empty.

    source

    pub fn content_len(&self) -> u64

    Get the length of the data addressed by this record’s content hash.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the [struct@Hash] of the content data of this record.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the Hash of the content data of this record.

    source

    pub fn timestamp(&self) -> u64

    Get the timestamp of this record.

    Trait Implementations§

    source§

    impl Clone for SignedEntry

    source§

    fn clone(&self) -> SignedEntry

    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 SignedEntry

    source§

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

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

    impl Deref for SignedEntry

    §

    type Target = Entry

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    source§

    impl<'de> Deserialize<'de> for SignedEntry

    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<SignedEntry> for Entry

    source§

    fn from(value: SignedEntry) -> Self

    Converts to this type from the input type.
    source§

    impl Ord for SignedEntry

    source§

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

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

    fn max(self, other: Self) -> Self
    where diff --git a/pr/2656/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2656/docs/iroh_docs/sync/type.ContentStatusCallback.html index ab71f61612..9c8e7f7392 100644 --- a/pr/2656/docs/iroh_docs/sync/type.ContentStatusCallback.html +++ b/pr/2656/docs/iroh_docs/sync/type.ContentStatusCallback.html @@ -1,2 +1,2 @@ -ContentStatusCallback in iroh_docs::sync - Rust

    Type Alias iroh_docs::sync::ContentStatusCallback

    source ·
    pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
    Expand description

    Callback that may be set on a replica to determine the availability status for a content hash.

    +ContentStatusCallback in iroh_docs::sync - Rust

    Type Alias iroh_docs::sync::ContentStatusCallback

    source ·
    pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
    Expand description

    Callback that may be set on a replica to determine the availability status for a content hash.

    Aliased Type§

    struct ContentStatusCallback { /* private fields */ }
    \ No newline at end of file diff --git a/pr/2656/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2656/docs/iroh_gossip/metrics/struct.Metrics.html index 8015a055b5..7e32b614fe 100644 --- a/pr/2656/docs/iroh_gossip/metrics/struct.Metrics.html +++ b/pr/2656/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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_gossip/net/enum.Command.html b/pr/2656/docs/iroh_gossip/net/enum.Command.html index 17bff52107..a4b86d9985 100644 --- a/pr/2656/docs/iroh_gossip/net/enum.Command.html +++ b/pr/2656/docs/iroh_gossip/net/enum.Command.html @@ -1,11 +1,11 @@ Command in iroh_gossip::net - Rust

    Enum iroh_gossip::net::Command

    source ·
    pub enum Command {
         Broadcast(Bytes),
         BroadcastNeighbors(Bytes),
    -    JoinPeers(Vec<NodeId>),
    +    JoinPeers(Vec<NodeId>),
     }
    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

    -
    §

    JoinPeers(Vec<NodeId>)

    Connect to a set of peers

    +
    §

    JoinPeers(Vec<NodeId>)

    Connect to a set of peers

    Trait Implementations§

    source§

    impl Debug for Command

    source§

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

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

    impl<'de> Deserialize<'de> for Command

    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 Command

    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/2656/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2656/docs/iroh_gossip/net/enum.GossipEvent.html index c978f99eec..ba59c3df51 100644 --- a/pr/2656/docs/iroh_gossip/net/enum.GossipEvent.html +++ b/pr/2656/docs/iroh_gossip/net/enum.GossipEvent.html @@ -1,17 +1,17 @@ GossipEvent in iroh_gossip::net - Rust

    Enum iroh_gossip::net::GossipEvent

    source ·
    pub enum GossipEvent {
    -    Joined(Vec<NodeId>),
    -    NeighborUp(NodeId),
    -    NeighborDown(NodeId),
    +    Joined(Vec<NodeId>),
    +    NeighborUp(NodeId),
    +    NeighborDown(NodeId),
         Received(Message),
     }
    Expand description

    Events emitted from a gossip topic.

    These are the events emitted from a GossipReceiver, wrapped in Event::Gossip.

    -

    Variants§

    §

    Joined(Vec<NodeId>)

    We joined the topic with at least one peer.

    +

    Variants§

    §

    Joined(Vec<NodeId>)

    We joined the topic with at least one peer.

    This is the first event on a GossipReceiver and will only be emitted once.

    -
    §

    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.

    +
    §

    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)

    We received a gossip message 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/2656/docs/iroh_gossip/net/struct.Gossip.html b/pr/2656/docs/iroh_gossip/net/struct.Gossip.html index ee0252cc06..80f0a25919 100644 --- a/pr/2656/docs/iroh_gossip/net/struct.Gossip.html +++ b/pr/2656/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,7 +13,7 @@

    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 handle_connection(&self, conn: Connection) -> Result<()>

    Handle an incoming [Connection].

    @@ -21,7 +21,7 @@
    source

    pub async fn join( &self, topic_id: TopicId, - bootstrap: Vec<NodeId> + bootstrap: Vec<NodeId> ) -> Result<GossipTopic>

    Join a gossip topic with the default options and wait for at least one active connection.

    source

    pub fn join_with_opts( &self, diff --git a/pr/2656/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2656/docs/iroh_gossip/net/struct.GossipReceiver.html index 0a5f12add5..b95383532b 100644 --- a/pr/2656/docs/iroh_gossip/net/struct.GossipReceiver.html +++ b/pr/2656/docs/iroh_gossip/net/struct.GossipReceiver.html @@ -1,6 +1,6 @@ GossipReceiver in iroh_gossip::net - Rust

    Struct iroh_gossip::net::GossipReceiver

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

    Receiver for gossip events on a topic.

    This is a [Stream] of Events emitted from the topic.

    -

    Implementations§

    source§

    impl GossipReceiver

    source

    pub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_

    Lists our current direct neighbors.

    +

    Implementations§

    source§

    impl GossipReceiver

    source

    pub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_

    Lists our current direct neighbors.

    source

    pub async fn joined(&mut self) -> Result<()>

    Waits until we are connected to at least one node.

    This progresses the stream until we received GossipEvent::Joined, which is the first item emitted on the stream.

    diff --git a/pr/2656/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2656/docs/iroh_gossip/net/struct.GossipSender.html index 783525ffda..516f9a8776 100644 --- a/pr/2656/docs/iroh_gossip/net/struct.GossipSender.html +++ b/pr/2656/docs/iroh_gossip/net/struct.GossipSender.html @@ -1,7 +1,7 @@ GossipSender in iroh_gossip::net - Rust

    Struct iroh_gossip::net::GossipSender

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

    Sender for a gossip topic.

    Implementations§

    source§

    impl GossipSender

    source

    pub async fn broadcast(&self, message: Bytes) -> Result<()>

    Broadcast a message to all nodes.

    source

    pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>

    Broadcast a message to our direct neighbors.

    -
    source

    pub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>

    Join a set of peers.

    +
    source

    pub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>

    Join a set of peers.

    Trait Implementations§

    source§

    impl Debug for GossipSender

    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> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/2656/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2656/docs/iroh_gossip/net/struct.JoinOptions.html index 7b6f3def1e..b17040bbe7 100644 --- a/pr/2656/docs/iroh_gossip/net/struct.JoinOptions.html +++ b/pr/2656/docs/iroh_gossip/net/struct.JoinOptions.html @@ -1,14 +1,14 @@ JoinOptions in iroh_gossip::net - Rust

    Struct iroh_gossip::net::JoinOptions

    source ·
    pub struct JoinOptions {
    -    pub bootstrap: BTreeSet<NodeId>,
    +    pub bootstrap: BTreeSet<NodeId>,
         pub subscription_capacity: usize,
     }
    Expand description

    Options for joining a gossip topic.

    -

    Fields§

    §bootstrap: BTreeSet<NodeId>

    The initial bootstrap nodes

    +

    Fields§

    §bootstrap: BTreeSet<NodeId>

    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.

    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.

    -

    Implementations§

    source§

    impl JoinOptions

    source

    pub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self

    Creates JoinOptions with the provided bootstrap nodes and the default subscription +

    Implementations§

    source§

    impl JoinOptions

    source

    pub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self

    Creates JoinOptions with the provided bootstrap nodes and the default subscription capacity.

    Trait Implementations§

    source§

    impl Debug for JoinOptions

    source§

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

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

    impl<'de> Deserialize<'de> for JoinOptions

    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 JoinOptions

    source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where diff --git a/pr/2656/docs/iroh_gossip/net/struct.Message.html b/pr/2656/docs/iroh_gossip/net/struct.Message.html index b91b14c1a4..c912230a9b 100644 --- a/pr/2656/docs/iroh_gossip/net/struct.Message.html +++ b/pr/2656/docs/iroh_gossip/net/struct.Message.html @@ -1,12 +1,12 @@ Message in iroh_gossip::net - Rust

    Struct iroh_gossip::net::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, __derive_more_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/2656/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2656/docs/iroh_gossip/net/type.ProtoCommand.html index c92491335f..0d11377502 100644 --- a/pr/2656/docs/iroh_gossip/net/type.ProtoCommand.html +++ b/pr/2656/docs/iroh_gossip/net/type.ProtoCommand.html @@ -1,9 +1,9 @@ -ProtoCommand in iroh_gossip::net - Rust

    Type Alias iroh_gossip::net::ProtoCommand

    source ·
    pub type ProtoCommand = Command<PublicKey>;
    Expand description

    Commands for the gossip protocol

    +ProtoCommand in iroh_gossip::net - Rust

    Type Alias iroh_gossip::net::ProtoCommand

    source ·
    pub type ProtoCommand = Command<PublicKey>;
    Expand description

    Commands for the gossip protocol

    Aliased Type§

    enum ProtoCommand {
    -    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/2656/docs/iroh_gossip/net/type.ProtoEvent.html b/pr/2656/docs/iroh_gossip/net/type.ProtoEvent.html index ab83aa1b4b..50f405bc20 100644 --- a/pr/2656/docs/iroh_gossip/net/type.ProtoEvent.html +++ b/pr/2656/docs/iroh_gossip/net/type.ProtoEvent.html @@ -1,9 +1,9 @@ -ProtoEvent in iroh_gossip::net - Rust

    Type Alias iroh_gossip::net::ProtoEvent

    source ·
    pub type ProtoEvent = Event<PublicKey>;
    Expand description

    Events emitted from the gossip protocol

    +ProtoEvent in iroh_gossip::net - Rust

    Type Alias iroh_gossip::net::ProtoEvent

    source ·
    pub type ProtoEvent = Event<PublicKey>;
    Expand description

    Events emitted from the gossip protocol

    Aliased Type§

    enum ProtoEvent {
    -    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/2656/docs/iroh_gossip/net/util/fn.read_message.html b/pr/2656/docs/iroh_gossip/net/util/fn.read_message.html index ab218b95bc..d506996a91 100644 --- a/pr/2656/docs/iroh_gossip/net/util/fn.read_message.html +++ b/pr/2656/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/2656/docs/iroh_gossip/net/util/fn.write_message.html b/pr/2656/docs/iroh_gossip/net/util/fn.write_message.html index bf27476e54..bd7f2eda0f 100644 --- a/pr/2656/docs/iroh_gossip/net/util/fn.write_message.html +++ b/pr/2656/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/2656/docs/iroh_gossip/proto/topic/enum.Event.html b/pr/2656/docs/iroh_gossip/proto/topic/enum.Event.html index aac02859bc..dc9cad9699 100644 --- a/pr/2656/docs/iroh_gossip/proto/topic/enum.Event.html +++ b/pr/2656/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/2656/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2656/docs/iroh_net/endpoint/struct.AddrInfo.html index cc6b117004..aedc8b5a8f 100644 --- a/pr/2656/docs/iroh_net/endpoint/struct.AddrInfo.html +++ b/pr/2656/docs/iroh_net/endpoint/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::AddrInfo

    pub struct AddrInfo {
    +AddrInfo in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::AddrInfo

    source ·
    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§

    §

    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.

    +

    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.

    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§

    §

    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>( +

    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

    source§

    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) -> Self

    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 + __D: Deserializer<'de>,

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

    impl From<NodeInfo> for AddrInfo

    source§

    fn from(value: NodeInfo) -> Self

    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 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
    §

    impl PartialEq for AddrInfo

    §

    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
    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 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 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 <= +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 <= 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
    §

    impl Serialize for AddrInfo

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for AddrInfo

    source§

    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
    §

    impl Eq for AddrInfo

    §

    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
    source§

    impl Eq for AddrInfo

    source§

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2656/docs/iroh_net/endpoint/struct.NodeAddr.html index b30b3e5a31..af869fa2bc 100644 --- a/pr/2656/docs/iroh_net/endpoint/struct.NodeAddr.html +++ b/pr/2656/docs/iroh_net/endpoint/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::NodeAddr

    pub struct NodeAddr {
    +NodeAddr in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::NodeAddr

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

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

    @@ -25,40 +25,40 @@ 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§

    §

    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( +

    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( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

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

    -

    pub fn from_parts( +

    source

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

    Creates a new NodeAddr from its parts.

    -

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

    Applies the options to self.

    +
    source

    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.

    -

    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>( +

    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

    source§

    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
    §

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

    §

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

    Converts to this type from the input type.
    §

    impl From<NodeAddr> for NodeTicket

    §

    fn from(addr: NodeAddr) -> NodeTicket

    Creates a ticket from given addressing info.

    -
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    §

    impl From<NodeTicket> for NodeAddr

    §

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    -
    §

    impl From<PublicKey> for NodeAddr

    §

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<RemoteInfo> for NodeAddr

    source§

    fn from(info: RemoteInfo) -> Self

    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 + __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<NodeAddr> for NodeTicket

    source§

    fn from(addr: NodeAddr) -> NodeTicket

    Creates a ticket from given addressing info.

    +
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<NodeTicket> for NodeAddr

    source§

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    +
    source§

    impl From<PublicKey> for NodeAddr

    source§

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<RemoteInfo> for NodeAddr

    source§

    fn from(info: RemoteInfo) -> Self

    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 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
    §

    impl PartialEq for NodeAddr

    §

    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
    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 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 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 <= +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 <= 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
    §

    impl Serialize for NodeAddr

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for NodeAddr

    source§

    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
    §

    impl Eq for NodeAddr

    §

    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
    source§

    impl Eq for NodeAddr

    source§

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2656/docs/iroh_net/key/enum.KeyParsingError.html index ab372b25b5..ef6b6d7d94 100644 --- a/pr/2656/docs/iroh_net/key/enum.KeyParsingError.html +++ b/pr/2656/docs/iroh_net/key/enum.KeyParsingError.html @@ -1,10 +1,10 @@ -KeyParsingError in iroh_net::key - Rust

    Enum iroh_net::key::KeyParsingError

    pub enum KeyParsingError {
    -    Base32(HexOrBase32ParseError),
    +KeyParsingError in iroh_net::key - Rust

    Enum iroh_net::key::KeyParsingError

    source ·
    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.

    +

    Variants§

    §

    Base32(HexOrBase32ParseError)

    Error when decoding the base32.

    §

    Key(Error)

    Error when decoding the public key.

    -

    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 +

    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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/key/index.html b/pr/2656/docs/iroh_net/key/index.html index 891f1a0a5c..d62e12a2be 100644 --- a/pr/2656/docs/iroh_net/key/index.html +++ b/pr/2656/docs/iroh_net/key/index.html @@ -1,2 +1,2 @@ -iroh_net::key - Rust

    Module iroh_net::key

    Expand description

    Cryptographic key handling for iroh-net.

    +iroh_net::key - Rust

    Module iroh_net::key

    source ·
    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/2656/docs/iroh_net/key/struct.PublicKey.html b/pr/2656/docs/iroh_net/key/struct.PublicKey.html index 48ebdd43c8..a0c10a6fbf 100644 --- a/pr/2656/docs/iroh_net/key/struct.PublicKey.html +++ b/pr/2656/docs/iroh_net/key/struct.PublicKey.html @@ -1,45 +1,45 @@ -PublicKey in iroh_net::key - Rust

    Struct iroh_net::key::PublicKey

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

    A public key.

    +PublicKey in iroh_net::key - Rust

    Struct iroh_net::key::PublicKey

    source ·
    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§

    §

    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.

    +

    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.

    §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.

    -

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

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

    +
    source

    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.

    -

    pub fn fmt_short(&self) -> String

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

    source

    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§

    §

    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>( +

    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

    source§

    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
    §

    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.

    + 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.

    Display is capable of serialising this format.

    -
    §

    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 +
    §

    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 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 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,

    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,

    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
    §

    impl PartialEq for PublicKey

    §

    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
    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 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 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 <= +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 <= 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
    §

    impl Serialize for PublicKey

    §

    fn serialize<S>( +operator. Read more

    source§

    impl Serialize for PublicKey

    source§

    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
    §

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

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

    fn try_from( + 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( bytes: &[u8] -) -> 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( +) -> 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( bytes: &[u8; 32] -) -> 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 +) -> 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 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/2656/docs/iroh_net/key/struct.SecretKey.html b/pr/2656/docs/iroh_net/key/struct.SecretKey.html index bee65e93b5..0aa6678426 100644 --- a/pr/2656/docs/iroh_net/key/struct.SecretKey.html +++ b/pr/2656/docs/iroh_net/key/struct.SecretKey.html @@ -1,24 +1,24 @@ -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 +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 R: CryptoRngCore + ?Sized,

    Generate a new SecretKey with a randomness generator.

    -

    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 +

    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 T: AsRef<[u8]>,

    Deserialise this key from OpenSSH format.

    -

    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. +

    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. The public part can always be recovered.

    -

    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>( +

    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

    source§

    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
    §

    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>( + 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

    source§

    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
    §

    impl TryFrom<&[u8]> for SecretKey

    §

    type Error = Error

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

    fn try_from( + 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( 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/2656/docs/iroh_net/key/struct.SharedSecret.html b/pr/2656/docs/iroh_net/key/struct.SharedSecret.html index 6e01bbb818..0a7cf979c8 100644 --- a/pr/2656/docs/iroh_net/key/struct.SharedSecret.html +++ b/pr/2656/docs/iroh_net/key/struct.SharedSecret.html @@ -1,7 +1,7 @@ -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 +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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/key/type.NodeId.html b/pr/2656/docs/iroh_net/key/type.NodeId.html index 1e14e7427b..6041b14f41 100644 --- a/pr/2656/docs/iroh_net/key/type.NodeId.html +++ b/pr/2656/docs/iroh_net/key/type.NodeId.html @@ -1,4 +1,4 @@ -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.

    +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.

    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/2656/docs/iroh_net/metrics/struct.MagicsockMetrics.html b/pr/2656/docs/iroh_net/metrics/struct.MagicsockMetrics.html index 285e25428a..ae514674b3 100644 --- a/pr/2656/docs/iroh_net/metrics/struct.MagicsockMetrics.html +++ b/pr/2656/docs/iroh_net/metrics/struct.MagicsockMetrics.html @@ -1,55 +1,55 @@ MagicsockMetrics in iroh_net::metrics - Rust

    Struct iroh_net::metrics::MagicsockMetrics

    source ·
    pub struct MagicsockMetrics {
    Show 41 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 recv_gro_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 recv_gro_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.

    -
    §recv_gro_datagrams: Counter

    Number of datagrams received using GRO

    -
    §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

    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§

    §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.

    +
    §recv_gro_datagrams: Counter

    Number of datagrams received using GRO

    +
    §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

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/netcheck/struct.Metrics.html b/pr/2656/docs/iroh_net/netcheck/struct.Metrics.html index 4784e60a01..c118698371 100644 --- a/pr/2656/docs/iroh_net/netcheck/struct.Metrics.html +++ b/pr/2656/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

    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§

    §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

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/portmapper/struct.Metrics.html b/pr/2656/docs/iroh_net/portmapper/struct.Metrics.html index 35a099a10e..abc1aaf34b 100644 --- a/pr/2656/docs/iroh_net/portmapper/struct.Metrics.html +++ b/pr/2656/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

    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§

    §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

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/relay/server/struct.Metrics.html b/pr/2656/docs/iroh_net/relay/server/struct.Metrics.html index 09001f2912..0db2b36ccd 100644 --- a/pr/2656/docs/iroh_net/relay/server/struct.Metrics.html +++ b/pr/2656/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

    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§

    §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

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/relay/struct.RelayUrl.html b/pr/2656/docs/iroh_net/relay/struct.RelayUrl.html index e54317d2c7..dac212fb82 100644 --- a/pr/2656/docs/iroh_net/relay/struct.RelayUrl.html +++ b/pr/2656/docs/iroh_net/relay/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh_net::relay - Rust

    Struct iroh_net::relay::RelayUrl

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

    A URL identifying a relay server.

    +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.

    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§

    §

    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.

    +

    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.

    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.
    §

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

    Dereferences the value.
    §

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

    §

    fn deserialize<__D>( +

    §

    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

    source§

    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
    §

    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.
    §

    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.

    + __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<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.

    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.
    §

    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 +
    §

    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 __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 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,

    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,

    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
    §

    impl PartialEq for RelayUrl

    §

    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
    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 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 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 <= +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 <= 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
    §

    impl Serialize for RelayUrl

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for RelayUrl

    source§

    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
    §

    impl Eq for RelayUrl

    §

    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
    source§

    impl Eq for RelayUrl

    source§

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/struct.AddrInfo.html b/pr/2656/docs/iroh_net/struct.AddrInfo.html index 6e48d99a9e..7b4f4ade76 100644 --- a/pr/2656/docs/iroh_net/struct.AddrInfo.html +++ b/pr/2656/docs/iroh_net/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh_net - Rust

    Struct iroh_net::AddrInfo

    pub struct AddrInfo {
    +AddrInfo in iroh_net - Rust

    Struct iroh_net::AddrInfo

    source ·
    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§

    §

    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.

    +

    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.

    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§

    §

    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>( +

    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

    source§

    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) -> Self

    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 + __D: Deserializer<'de>,

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

    impl From<NodeInfo> for AddrInfo

    source§

    fn from(value: NodeInfo) -> Self

    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 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
    §

    impl PartialEq for AddrInfo

    §

    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
    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 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 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 <= +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 <= 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
    §

    impl Serialize for AddrInfo

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for AddrInfo

    source§

    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
    §

    impl Eq for AddrInfo

    §

    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
    source§

    impl Eq for AddrInfo

    source§

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/struct.NodeAddr.html b/pr/2656/docs/iroh_net/struct.NodeAddr.html index a22f12cb8c..dbd18b6de0 100644 --- a/pr/2656/docs/iroh_net/struct.NodeAddr.html +++ b/pr/2656/docs/iroh_net/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh_net - Rust

    Struct iroh_net::NodeAddr

    pub struct NodeAddr {
    +NodeAddr in iroh_net - Rust

    Struct iroh_net::NodeAddr

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

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

    @@ -25,40 +25,40 @@ 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§

    §

    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( +

    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( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

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

    -

    pub fn from_parts( +

    source

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

    Creates a new NodeAddr from its parts.

    -

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

    Applies the options to self.

    +
    source

    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.

    -

    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>( +

    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

    source§

    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
    §

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

    §

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

    Converts to this type from the input type.
    §

    impl From<NodeAddr> for NodeTicket

    §

    fn from(addr: NodeAddr) -> NodeTicket

    Creates a ticket from given addressing info.

    -
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    §

    impl From<NodeTicket> for NodeAddr

    §

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    -
    §

    impl From<PublicKey> for NodeAddr

    §

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<RemoteInfo> for NodeAddr

    source§

    fn from(info: RemoteInfo) -> Self

    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 + __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<NodeAddr> for NodeTicket

    source§

    fn from(addr: NodeAddr) -> NodeTicket

    Creates a ticket from given addressing info.

    +
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<NodeTicket> for NodeAddr

    source§

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    +
    source§

    impl From<PublicKey> for NodeAddr

    source§

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<RemoteInfo> for NodeAddr

    source§

    fn from(info: RemoteInfo) -> Self

    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 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
    §

    impl PartialEq for NodeAddr

    §

    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
    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 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 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 <= +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 <= 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
    §

    impl Serialize for NodeAddr

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for NodeAddr

    source§

    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
    §

    impl Eq for NodeAddr

    §

    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
    source§

    impl Eq for NodeAddr

    source§

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/ticket/struct.NodeTicket.html b/pr/2656/docs/iroh_net/ticket/struct.NodeTicket.html index 34b0b5392a..62c904bda3 100644 --- a/pr/2656/docs/iroh_net/ticket/struct.NodeTicket.html +++ b/pr/2656/docs/iroh_net/ticket/struct.NodeTicket.html @@ -1,4 +1,4 @@ -NodeTicket in iroh_net::ticket - Rust

    Struct iroh_net::ticket::NodeTicket

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

    A token containing information for establishing a connection to a node.

    +NodeTicket in iroh_net::ticket - Rust

    Struct iroh_net::ticket::NodeTicket

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

    A token containing information for establishing a connection to a node.

    Contains

    • The NodeId of the node to connect to (a 32-byte ed25519 public key).
    • @@ -8,20 +8,20 @@

      This allows establishing a connection to the node in most circumstances where it is possible to do so.

      This NodeTicket is a single item which can be easily serialized and deserialized.

      -

    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>( +

    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

    source§

    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
    §

    impl Display for NodeTicket

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<NodeAddr> for NodeTicket

    §

    fn from(addr: NodeAddr) -> NodeTicket

    Creates a ticket from given addressing info.

    -
    §

    impl From<NodeTicket> for NodeAddr

    §

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    -
    §

    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 + 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 From<NodeAddr> for NodeTicket

    source§

    fn from(addr: NodeAddr) -> NodeTicket

    Creates a ticket from given addressing info.

    +
    source§

    impl From<NodeTicket> for NodeAddr

    source§

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    +
    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 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 Serialize for NodeTicket

    §

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

    source§

    impl Serialize for NodeTicket

    source§

    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
    §

    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 + 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 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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net/type.NodeId.html b/pr/2656/docs/iroh_net/type.NodeId.html index 9bfe735d4b..ddaba0e31b 100644 --- a/pr/2656/docs/iroh_net/type.NodeId.html +++ b/pr/2656/docs/iroh_net/type.NodeId.html @@ -1,4 +1,4 @@ -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.

    +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.

    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/2656/docs/iroh_net_bench/enum.EndpointSelector.html b/pr/2656/docs/iroh_net_bench/enum.EndpointSelector.html index 076a63a14f..f8732c2113 100644 --- a/pr/2656/docs/iroh_net_bench/enum.EndpointSelector.html +++ b/pr/2656/docs/iroh_net_bench/enum.EndpointSelector.html @@ -1,7 +1,7 @@ EndpointSelector in iroh_net_bench - Rust

    Enum iroh_net_bench::EndpointSelector

    source ·
    pub enum EndpointSelector {
    -    Iroh(Endpoint),
    +    Iroh(Endpoint),
         Quinn(Endpoint),
    -}

    Variants§

    §

    Iroh(Endpoint)

    §

    Quinn(Endpoint)

    Implementations§

    source§

    impl EndpointSelector

    source

    pub async fn close(self) -> Result<()>

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +}

    Variants§

    §

    Iroh(Endpoint)

    §

    Quinn(Endpoint)

    Implementations§

    source§

    impl EndpointSelector

    source

    pub async fn close(self) -> Result<()>

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_net_bench/iroh/fn.client.html b/pr/2656/docs/iroh_net_bench/iroh/fn.client.html index 7d79fae74e..005a05b10e 100644 --- a/pr/2656/docs/iroh_net_bench/iroh/fn.client.html +++ b/pr/2656/docs/iroh_net_bench/iroh/fn.client.html @@ -1,6 +1,6 @@ client in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::client

    source ·
    pub async fn client(
    -    server_addr: NodeAddr,
    -    relay_url: Option<RelayUrl>,
    +    server_addr: NodeAddr,
    +    relay_url: Option<RelayUrl>,
         opt: Opt
     ) -> Result<ClientStats>
    Expand description

    Create and run a client

    \ No newline at end of file diff --git a/pr/2656/docs/iroh_net_bench/iroh/fn.connect_client.html b/pr/2656/docs/iroh_net_bench/iroh/fn.connect_client.html index 86007e9c59..e6e06ec03d 100644 --- a/pr/2656/docs/iroh_net_bench/iroh/fn.connect_client.html +++ b/pr/2656/docs/iroh_net_bench/iroh/fn.connect_client.html @@ -1,6 +1,6 @@ connect_client in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::connect_client

    source ·
    pub async fn connect_client(
    -    server_addr: NodeAddr,
    -    relay_url: Option<RelayUrl>,
    +    server_addr: NodeAddr,
    +    relay_url: Option<RelayUrl>,
         opt: Opt
    -) -> Result<(Endpoint, Connection)>
    Expand description

    Create a client endpoint and client connection

    +) -> Result<(Endpoint, Connection)>
    Expand description

    Create a client endpoint and client connection

    \ No newline at end of file diff --git a/pr/2656/docs/iroh_net_bench/iroh/fn.server.html b/pr/2656/docs/iroh_net_bench/iroh/fn.server.html index ecf6facd05..f05000c727 100644 --- a/pr/2656/docs/iroh_net_bench/iroh/fn.server.html +++ b/pr/2656/docs/iroh_net_bench/iroh/fn.server.html @@ -1,2 +1,2 @@ -server in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::server

    source ·
    pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
    Expand description

    Take the provided endpoint and run the server

    +server in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::server

    source ·
    pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
    Expand description

    Take the provided endpoint and run the server

    \ No newline at end of file diff --git a/pr/2656/docs/iroh_net_bench/iroh/fn.server_endpoint.html b/pr/2656/docs/iroh_net_bench/iroh/fn.server_endpoint.html index 939c20944b..9363cc5192 100644 --- a/pr/2656/docs/iroh_net_bench/iroh/fn.server_endpoint.html +++ b/pr/2656/docs/iroh_net_bench/iroh/fn.server_endpoint.html @@ -1,6 +1,6 @@ server_endpoint in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::server_endpoint

    source ·
    pub fn server_endpoint(
         rt: &Runtime,
    -    relay_url: &Option<RelayUrl>,
    +    relay_url: &Option<RelayUrl>,
         opt: &Opt
    -) -> (NodeAddr, Endpoint)
    Expand description

    Creates a server endpoint which runs on the given runtime

    +) -> (NodeAddr, Endpoint)
    Expand description

    Creates a server endpoint which runs on the given runtime

    \ No newline at end of file diff --git a/pr/2656/docs/iroh_relay/metrics/struct.StunMetrics.html b/pr/2656/docs/iroh_relay/metrics/struct.StunMetrics.html index 2976804039..22218ef079 100644 --- a/pr/2656/docs/iroh_relay/metrics/struct.StunMetrics.html +++ b/pr/2656/docs/iroh_relay/metrics/struct.StunMetrics.html @@ -1,18 +1,18 @@ StunMetrics in iroh_relay::metrics - Rust

    Struct iroh_relay::metrics::StunMetrics

    source ·
    pub struct StunMetrics {
    -    pub requests: Counter,
    -    pub ipv4_success: Counter,
    -    pub ipv6_success: Counter,
    -    pub bad_requests: Counter,
    -    pub failures: Counter,
    +    pub requests: Counter,
    +    pub ipv4_success: Counter,
    +    pub ipv6_success: Counter,
    +    pub bad_requests: Counter,
    +    pub failures: Counter,
     }
    Expand description

    StunMetrics tracked for the relay server

    -

    Fields§

    §requests: Counter

    Number of stun requests made

    -
    §ipv4_success: Counter

    Number of successful requests over ipv4

    -
    §ipv6_success: Counter

    Number of successful requests over ipv6

    -
    §bad_requests: Counter

    Number of bad requests, either non-stun packets or incorrect binding request

    -
    §failures: Counter

    Number of failures

    -

    Trait Implementations§

    source§

    impl Clone for StunMetrics

    source§

    fn clone(&self) -> StunMetrics

    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 StunMetrics

    source§

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

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

    impl Default for StunMetrics

    source§

    fn default() -> Self

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

    impl Iterable for StunMetrics

    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 StunMetrics

    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§

    §requests: Counter

    Number of stun requests made

    +
    §ipv4_success: Counter

    Number of successful requests over ipv4

    +
    §ipv6_success: Counter

    Number of successful requests over ipv6

    +
    §bad_requests: Counter

    Number of bad requests, either non-stun packets or incorrect binding request

    +
    §failures: Counter

    Number of failures

    +

    Trait Implementations§

    source§

    impl Clone for StunMetrics

    source§

    fn clone(&self) -> StunMetrics

    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 StunMetrics

    source§

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

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

    impl Default for StunMetrics

    source§

    fn default() -> Self

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

    impl Iterable for StunMetrics

    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 StunMetrics

    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> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( diff --git a/pr/2656/docs/iroh_relay/struct.Config.html b/pr/2656/docs/iroh_relay/struct.Config.html index 95a7a9161d..e383c32214 100644 --- a/pr/2656/docs/iroh_relay/struct.Config.html +++ b/pr/2656/docs/iroh_relay/struct.Config.html @@ -1,5 +1,5 @@ Config in iroh_relay - Rust

    Struct iroh_relay::Config

    source ·
    pub(crate) struct Config {
    -    pub(crate) secret_key: SecretKey,
    +    pub(crate) secret_key: SecretKey,
         pub(crate) enable_relay: bool,
         pub(crate) http_bind_addr: Option<SocketAddr>,
         pub(crate) tls: Option<TlsConfig>,
    @@ -10,7 +10,7 @@
         pub(crate) metrics_bind_addr: Option<SocketAddr>,
     }
    Expand description

    Configuration for the relay-server.

    This is (de)serialised to/from a TOML config file.

    -

    Fields§

    §secret_key: SecretKey

    The iroh [SecretKey] for this relay server.

    +

    Fields§

    §secret_key: SecretKey

    The iroh SecretKey for this relay server.

    If not specified a new key will be generated and the config file will be re-written using it.

    §enable_relay: bool

    Whether to enable the Relay server.

    diff --git a/pr/2656/docs/settings.html b/pr/2656/docs/settings.html index 8302faddd9..bf71602add 100644 --- a/pr/2656/docs/settings.html +++ b/pr/2656/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/2656/docs/trait.impl/core/convert/trait.From.js b/pr/2656/docs/trait.impl/core/convert/trait.From.js index 72368f7e56..970104a420 100644 --- a/pr/2656/docs/trait.impl/core/convert/trait.From.js +++ b/pr/2656/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<NodeAddr> for NodeTicket"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["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<ClosedStream> for GetError"],["impl From<ClosedStream> for ConnectedNextError"],["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"],["impl<T: CustomEventSender> From<T> for EventSender"]], "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<RemoteInfo> for NodeAddr"],["impl From<GenError> for CreateConfigError"],["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<NoInitialCipherSuite> for CreateConfigError"],["impl From<SurgeError> for PingError"],["impl From<UdpSocket> for UdpSocket"],["impl<T> From<T> for ConcurrentDiscovery
    where\n T: IntoIterator<Item = Box<dyn Discovery>>,
    "]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/pr/2656/docs/trait.impl/iroh_base/ticket/trait.Ticket.js b/pr/2656/docs/trait.impl/iroh_base/ticket/trait.Ticket.js index 12fa1e3ee5..5d209fabd2 100644 --- a/pr/2656/docs/trait.impl/iroh_base/ticket/trait.Ticket.js +++ b/pr/2656/docs/trait.impl/iroh_base/ticket/trait.Ticket.js @@ -1,5 +1,5 @@ (function() {var implementors = { "iroh":[], "iroh_base":[], -"iroh_docs":[["impl Ticket for DocTicket"]] +"iroh_docs":[["impl Ticket for DocTicket"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/pr/2656/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2656/docs/trait.impl/iroh_metrics/core/trait.Metric.js index cfd007ffa4..d96d2ad190 100644 --- a/pr/2656/docs/trait.impl/iroh_metrics/core/trait.Metric.js +++ b/pr/2656/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_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]], -"iroh_relay":[["impl Metric for StunMetrics"]] +"iroh_docs":[["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/2656/docs/type.impl/iroh/gossip/proto/enum.Command.js b/pr/2656/docs/type.impl/iroh/gossip/proto/enum.Command.js index db2f51f42d..24101d8211 100644 --- a/pr/2656/docs/type.impl/iroh/gossip/proto/enum.Command.js +++ b/pr/2656/docs/type.impl/iroh/gossip/proto/enum.Command.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"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::ProtoCommand"],["
    §

    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::ProtoCommand"]] +"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::ProtoCommand"],["
    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::ProtoCommand"]] };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/2656/docs/type.impl/iroh/gossip/proto/enum.Event.js b/pr/2656/docs/type.impl/iroh/gossip/proto/enum.Event.js index d7db5f1ab1..71af58a6c4 100644 --- a/pr/2656/docs/type.impl/iroh/gossip/proto/enum.Event.js +++ b/pr/2656/docs/type.impl/iroh/gossip/proto/enum.Event.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    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::ProtoEvent"],["
    §

    impl<PI> Eq for Event<PI>
    where\n PI: Eq,

    ","Eq","iroh::gossip::net::ProtoEvent"],["
    §

    impl<PI> StructuralPartialEq for Event<PI>

    ","StructuralPartialEq","iroh::gossip::net::ProtoEvent"]] +"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::ProtoEvent"],["
    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::ProtoEvent"],["
    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::ProtoEvent"],["
    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::ProtoEvent"],["
    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::ProtoEvent"],["
    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::ProtoEvent"],["
    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::ProtoEvent"],["
    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::ProtoEvent"],["
    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::ProtoEvent"],["
    source§

    impl<PI> Eq for Event<PI>
    where\n PI: Eq,

    ","Eq","iroh::gossip::net::ProtoEvent"],["
    source§

    impl<PI> StructuralPartialEq for Event<PI>

    ","StructuralPartialEq","iroh::gossip::net::ProtoEvent"]] };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/2656/docs/type.impl/iroh/net/key/struct.PublicKey.js b/pr/2656/docs/type.impl/iroh/net/key/struct.PublicKey.js index 4cb64d296d..1622cafb77 100644 --- a/pr/2656/docs/type.impl/iroh/net/key/struct.PublicKey.js +++ b/pr/2656/docs/type.impl/iroh/net/key/struct.PublicKey.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"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"]] +"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"]] };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/2656/docs/type.impl/iroh_net/key/struct.PublicKey.js b/pr/2656/docs/type.impl/iroh_net/key/struct.PublicKey.js index bbff1af8fe..2fcaac350a 100644 --- a/pr/2656/docs/type.impl/iroh_net/key/struct.PublicKey.js +++ b/pr/2656/docs/type.impl/iroh_net/key/struct.PublicKey.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"iroh_net":[["
    §

    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"]] +"iroh_net":[["
    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"]] };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/2656/docs/type.impl/std/primitive.array.js b/pr/2656/docs/type.impl/std/primitive.array.js index 20af29001d..4d4303e493 100644 --- a/pr/2656/docs/type.impl/std/primitive.array.js +++ b/pr/2656/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"],["
    §

    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"]] +"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_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"],["
    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::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