pub trait PrimitiveType {
type Value: Copy + Send + Sync + 'static;
// Required method
fn get(&self) -> Self::Value;
}Expand description
A type that is, references, or wraps a primitive type
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
Source§impl PrimitiveType for NonZeroI128
impl PrimitiveType for NonZeroI128
Source§impl PrimitiveType for NonZeroIsize
impl PrimitiveType for NonZeroIsize
Source§impl PrimitiveType for NonZeroU128
impl PrimitiveType for NonZeroU128
Source§impl PrimitiveType for NonZeroUsize
impl PrimitiveType for NonZeroUsize
Source§impl<T> PrimitiveType for Pin<T>
impl<T> PrimitiveType for Pin<T>
Source§impl<T: PrimitiveType + Copy> PrimitiveType for Cell<T>
Implement PrimitiveType for Cell<T>
impl<T: PrimitiveType + Copy> PrimitiveType for Cell<T>
Implement PrimitiveType for Cell<T>
#[derive(Template)]
#[template(ext = "txt", source = "{{ value as u16 }}")]
struct Test<'a> {
value: &'a Pin<Rc<Cell<Saturating<NonZeroI16>>>>
}
assert_eq!(
Test { value: &Rc::pin(Cell::new(Saturating(NonZeroI16::new(-1).unwrap()))) }.to_string(),
"65535",
);