Files

19 lines
529 B
C#
Raw Permalink Normal View History

2025-07-27 23:46:54 +03:00
using System;
using System.Formats.Cbor;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using mROA.Implementation;
namespace mROA.Cbor
{
public static class CborExtensions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteToCborInline(this RequestId id, CborWriter writer)
{
Span<byte> span = stackalloc byte[16];
MemoryMarshal.Write(span, ref id);
writer.WriteByteString(span);
}
}
}