bytesbuf 0.4.2

Types for creating and manipulating byte sequences.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::mem::Memory;

/// Provides memory for byte sequences in a thread-safe manner.
///
/// This is a narrowing of [`Memory`] that adds additional constraints that enable
/// thread-safe shared access to the memory provider. If you do not need these extra
/// constraints, just use [`Memory`] directly.
pub trait MemoryShared: Memory + Send + Sync + 'static {}

impl<T> MemoryShared for T where T: Memory + Send + Sync + 'static {}