pub trait Buffer<S: ?Sized>:
Sized
+ Send
+ 'static {
// Required method
fn as_slice(&self) -> &S;
// Provided method
fn is_unique(&self) -> bool { ... }
}
Expand description
A buffer that contains a slice.
Buffer needs to implement Send
, as it may be dropped in another thread.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<S: ?Sized, B: Buffer<S> + Sync> Buffer<S> for Arc<B>
Available on non-crate feature portable-atomic
or crate feature portable-atomic-util
only.
impl<S: ?Sized, B: Buffer<S> + Sync> Buffer<S> for Arc<B>
Available on non-crate feature
portable-atomic
or crate feature portable-atomic-util
only.