mirror of
https://github.com/chylex/.NET-Community-Toolkit.git
synced 2024-09-08 00:42:50 +02:00
29 lines
839 B
C#
29 lines
839 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
|
|
namespace CommunityToolkit.HighPerformance.Streams;
|
|
|
|
/// <summary>
|
|
/// An interface for types acting as sources for <see cref="Span{T}"/> instances.
|
|
/// </summary>
|
|
internal interface ISpanOwner
|
|
{
|
|
/// <summary>
|
|
/// Gets the length of the underlying memory area.
|
|
/// </summary>
|
|
int Length { get; }
|
|
|
|
/// <summary>
|
|
/// Gets a <see cref="Span{T}"/> instance wrapping the underlying memory area.
|
|
/// </summary>
|
|
Span<byte> Span { get; }
|
|
|
|
/// <summary>
|
|
/// Gets a <see cref="Memory{T}"/> instance wrapping the underlying memory area.
|
|
/// </summary>
|
|
Memory<byte> Memory { get; }
|
|
}
|