Skip to documentation
SLOP

tiny.peer.PeerId

Reference tiny.peer PeerId

Defined in tiny.peer.

API (5)

Actions

Public operations.

Types and contracts

Public types and contracts.

Fields and members

Public fields and members.

No direct callersNo direct callstiny.peerPeerId
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/peer/src/identity.zig:13

zig
pub const PeerId = struct {    key: [key_bytes]u8,    pub const ParseError: type = PeerIdParseError;    pub fn format(self: PeerId, output: []u8) text.EncodeError![]const u8 {        return text.encode(&self.key, output);    }    pub fn parse(source: []const u8) ParseError!PeerId {        if (source.len != text_bytes) return error.InvalidLength;        var key: [key_bytes]u8 = undefined;        const decoded = text.decode(source, &key) catch return error.InvalidEncoding;        if (decoded != key.len) return error.InvalidLength;        return .{ .key = key };    }    pub fn eql(self: PeerId, other: PeerId) bool {        return std.mem.eql(u8, &self.key, &other.key);    }};

Source: lib/peer/src/root.zig:27

zig
pub const PeerId = identity.PeerId;
Called byCallsNo direct callsTicketeqlPeerIdeql
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.peer.src.textencodePeerIdformat
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest sourcelib.peer.src.identitytest: PeerId parse rejects lengths ot...test sourcelib.peer.src.identity.test_RFC_4648_35 PeerId parse rejects noncanonical b...private sourcelib.peer.src.textdecodePeerIdparse
Static calls · unresolved targets: 0 · external targets: 0.

Audit

Definitions5
Public names5
Members1
Version26.7.0
Revisiondaab053ee433