Struct cache_padded::CachePadded [−][src]
#[repr(align(128))]pub struct CachePadded<T>(_);
Pads and aligns data to the length of a cache line.
Implementations
impl<T> CachePadded<T>
[src]
impl<T> CachePadded<T>
[src]pub const fn new(t: T) -> CachePadded<T>
[src]
Pads and aligns a piece of data to the length of a cache line.
Examples
use cache_padded::CachePadded; let padded = CachePadded::new(1);
pub fn into_inner(self) -> T
[src]
Returns the inner data.
Examples
use cache_padded::CachePadded; let padded = CachePadded::new(7); let data = padded.into_inner(); assert_eq!(data, 7);
Trait Implementations
impl<T: Clone> Clone for CachePadded<T>
[src]
impl<T: Clone> Clone for CachePadded<T>
[src]fn clone(&self) -> CachePadded<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Default> Default for CachePadded<T>
[src]
impl<T: Default> Default for CachePadded<T>
[src]fn default() -> CachePadded<T>
[src]
impl<T> Deref for CachePadded<T>
[src]
impl<T> Deref for CachePadded<T>
[src]impl<T> DerefMut for CachePadded<T>
[src]
impl<T> DerefMut for CachePadded<T>
[src]impl<T> From<T> for CachePadded<T>
[src]
impl<T> From<T> for CachePadded<T>
[src]impl<T: Hash> Hash for CachePadded<T>
[src]
impl<T: Hash> Hash for CachePadded<T>
[src]impl<T: PartialEq> PartialEq<CachePadded<T>> for CachePadded<T>
[src]
impl<T: PartialEq> PartialEq<CachePadded<T>> for CachePadded<T>
[src]fn eq(&self, other: &CachePadded<T>) -> bool
[src]
fn ne(&self, other: &CachePadded<T>) -> bool
[src]
impl<T: Copy> Copy for CachePadded<T>
[src]
impl<T: Eq> Eq for CachePadded<T>
[src]
impl<T> StructuralEq for CachePadded<T>
[src]
impl<T> StructuralPartialEq for CachePadded<T>
[src]
Auto Trait Implementations
impl<T> Send for CachePadded<T> where
T: Send,
T: Send,
impl<T> Sync for CachePadded<T> where
T: Sync,
T: Sync,
impl<T> Unpin for CachePadded<T> where
T: Unpin,
T: Unpin,