// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use Debug;
use crateMemoryShared;
/// Ability to provide memory capacity in a way suitable for shared access.
///
/// This trait is typically implemented by types that accept byte sequences or sequence builders
/// from callers. The implication is that using memory capacity obtained via this trait
/// (or [`Memory`][crate::mem::Memory], if implemented) will allow the implementing type to perform its
/// work in the most efficient manner because the memory capacity will be pre-configured to suit the
/// specific needs of the implementing type.
///
/// # Implementation patterns
///
/// A type implementing this trait should also implement [`Memory`][crate::mem::Memory], enabling
/// users to reserve memory capacity without needing to own an instance of the sharing-compatible
/// form of the memory provider, which may impose extra overhead.