namespace Brutal.SlangApi; /// /// Hand-written ergonomic helpers on top of the generated /// COM interface. The interface itself only exposes a raw void* + size pair; /// callers shouldn't have to assemble a span by hand to read the contents. /// public static unsafe partial class ISlangBlobExtensions { /// /// Returns the blob's contents as a . The span is /// valid until the blob is passed to . Copy if you need /// the bytes to outlive it. /// public static ReadOnlySpan AsSpan(this ISlangBlob self) => new(self.GetBufferPointer(), checked((int)self.GetBufferSize().Value)); }