Table of Contents

Struct PamojaFourBytes

Namespace
Pamoja.Native.Interop
Assembly
Pamoja.Native.dll

A 4-byte block descriptor or integrity code carried inline inside a blittable struct.

public struct PamojaFourBytes
Inherited Members

Fields

Length

The width of the value, in bytes.

public const int Length = 4

Field Value

int

Methods

From(ReadOnlySpan<byte>, string)

Reads a descriptor or integrity code from exactly 4 bytes.

public static PamojaFourBytes From(ReadOnlySpan<byte> bytes, string name)

Parameters

bytes ReadOnlySpan<byte>

The value.

name string

What the bytes are, for the exception message.

Returns

PamojaFourBytes

The value.

Exceptions

ArgumentException

bytes is not Length bytes.

ToArray()

Copies the value out as an array.

public readonly byte[] ToArray()

Returns

byte[]

The 4 bytes.