Trait askama::PrimitiveType
source · 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>
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",
);source§impl<T: PrimitiveType + ?Sized> PrimitiveType for &T
impl<T: PrimitiveType + ?Sized> PrimitiveType for &T
source§impl<T: PrimitiveType + ?Sized> PrimitiveType for &mut T
impl<T: PrimitiveType + ?Sized> PrimitiveType for &mut T
source§impl<T: PrimitiveType + ?Sized> PrimitiveType for Box<T>
Available on crate feature alloc only.
impl<T: PrimitiveType + ?Sized> PrimitiveType for Box<T>
Available on crate feature
alloc only.source§impl<T: PrimitiveType + ?Sized> PrimitiveType for Rc<T>
Available on crate feature alloc only.
impl<T: PrimitiveType + ?Sized> PrimitiveType for Rc<T>
Available on crate feature
alloc only.source§impl<T: PrimitiveType + ?Sized> PrimitiveType for Arc<T>
Available on crate feature alloc only.
impl<T: PrimitiveType + ?Sized> PrimitiveType for Arc<T>
Available on crate feature
alloc only.source§impl<T: PrimitiveType + ?Sized> PrimitiveType for Ref<'_, T>
impl<T: PrimitiveType + ?Sized> PrimitiveType for Ref<'_, T>
source§impl<T: PrimitiveType + ?Sized> PrimitiveType for RefMut<'_, T>
impl<T: PrimitiveType + ?Sized> PrimitiveType for RefMut<'_, T>
source§impl<T: PrimitiveType + ?Sized> PrimitiveType for MutexGuard<'_, T>
Available on crate feature std only.
impl<T: PrimitiveType + ?Sized> PrimitiveType for MutexGuard<'_, T>
Available on crate feature
std only.source§impl<T: PrimitiveType + ?Sized> PrimitiveType for RwLockReadGuard<'_, T>
Available on crate feature std only.
impl<T: PrimitiveType + ?Sized> PrimitiveType for RwLockReadGuard<'_, T>
Available on crate feature
std only.source§impl<T: PrimitiveType + ?Sized> PrimitiveType for RwLockWriteGuard<'_, T>
Available on crate feature std only.
impl<T: PrimitiveType + ?Sized> PrimitiveType for RwLockWriteGuard<'_, T>
Available on crate feature
std only.