Show / Hide Table of Contents

Struct Nibbles

Implements
IEquatable<Nibbles>
Namespace: Libplanet.Store.Trie
Assembly: Libplanet.Store.dll
Syntax
public readonly struct Nibbles

Fields

| Improve this Doc View Source

Empty

Declaration
public static readonly Nibbles Empty
Field Value
Type Description
Nibbles

Properties

| Improve this Doc View Source

ByteArray

A list of langword_csharp_bytes representing raw nibbles where each nibble is assigned to a langword_csharp_byte.

Declaration
public readonly ImmutableArray<byte> ByteArray { get; }
Property Value
Type Description
ImmutableArray<System.Byte>
| Improve this Doc View Source

Hex

The hex representation of the Nibbles. Unlike most other hex representations, returned langword_csharp_string is of the same length as ByteArray and can be of odd length.

Declaration
public readonly string Hex { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Item[Int32]

Declaration
public readonly byte this[int index] { get; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
System.Byte
| Improve this Doc View Source

Length

Declaration
public readonly int Length { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

Add(Byte)

Declaration
public readonly Nibbles Add(byte b)
Parameters
Type Name Description
System.Byte b
Returns
Type Description
Nibbles
| Improve this Doc View Source

AddRange(in ImmutableArray<Byte>)

Declaration
public readonly Nibbles AddRange(in ImmutableArray<byte> nibbles)
Parameters
Type Name Description
ImmutableArray<System.Byte> nibbles
Returns
Type Description
Nibbles
| Improve this Doc View Source

AddRange(in Nibbles)

Declaration
public readonly Nibbles AddRange(in Nibbles nibbles)
Parameters
Type Name Description
Nibbles nibbles
Returns
Type Description
Nibbles
| Improve this Doc View Source

Equals(Nibbles)

Declaration
public readonly bool Equals(Nibbles other)
Parameters
Type Name Description
Nibbles other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Nullable<Object>)

Declaration
public override readonly bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
| Improve this Doc View Source

FromHex(String)

Declaration
public static Nibbles FromHex(string hex)
Parameters
Type Name Description
System.String hex
Returns
Type Description
Nibbles
| Improve this Doc View Source

FromKeyBytes(in KeyBytes)

Declaration
public static Nibbles FromKeyBytes(in KeyBytes keyBytes)
Parameters
Type Name Description
KeyBytes keyBytes
Returns
Type Description
Nibbles
| Improve this Doc View Source

GetHashCode()

Declaration
public override readonly int GetHashCode()
Returns
Type Description
System.Int32
| Improve this Doc View Source

Skip(Int32)

Declaration
public readonly Nibbles Skip(int count)
Parameters
Type Name Description
System.Int32 count
Returns
Type Description
Nibbles
| Improve this Doc View Source

Take(Int32)

Declaration
public readonly Nibbles Take(int count)
Parameters
Type Name Description
System.Int32 count
Returns
Type Description
Nibbles
| Improve this Doc View Source

ToKeyBytes()

Gets a KeyBytes representing compressed nibbles where each pair of nibbles is compacted into a langword_csharp_byte.

Declaration
public readonly KeyBytes ToKeyBytes()
Returns
Type Description
KeyBytes

A KeyBytes representing compacted nibbles.

| Improve this Doc View Source

ToString()

Declaration
public override readonly string ToString()
Returns
Type Description
System.String

Implements

IEquatable<>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium