spl-pod 0.7.3

Solana Program Library Plain Old Data (Pod)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use {crate::error::PodSliceError, bytemuck::Pod};

/// Marker trait for converting to/from Pod `uint`'s and `usize`
pub trait PodLength: Pod + Into<usize> + TryFrom<usize> {}

/// Blanket implementation to automatically implement `PodLength` for any type
/// that satisfies the required bounds.
impl<T> PodLength for T
where
    T: Pod + Into<usize> + TryFrom<usize>,
    PodSliceError: From<<T as TryFrom<usize>>::Error>,
{
}