databake::converter

Type Alias StringAsStaticStr

Source
pub type StringAsStaticStr = AsStaticStr<String>;
Expand description

Aliased Type§

struct StringAsStaticStr(pub String);

Fields§

§0: String

Implementations

Source§

impl<T> AsStaticStr<T>
where T: AsRef<str>,

Source

pub fn into(self) -> T

Trait Implementations

Source§

impl<T> Bake for AsStaticStr<T>
where T: AsRef<str>,

Source§

fn bake(&self, _ctx: &CrateEnv) -> TokenStream

Returns a TokenStream that would evaluate to self. Read more
Source§

impl<T> BakeSize for AsStaticStr<T>
where T: AsRef<str>,

Source§

fn borrows_size(&self) -> usize

Returns the size
Source§

impl<T> Default for AsStaticStr<T>
where T: AsRef<str> + Default,

Source§

fn default() -> AsStaticStr<T>

Returns the “default value” for a type. Read more
Source§

impl<T> Deref for AsStaticStr<T>
where T: AsRef<str>,

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T> DerefMut for AsStaticStr<T>
where T: AsRef<str>,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<T> From<T> for AsStaticStr<T>
where T: AsRef<str>,

Source§

fn from(value: T) -> Self

Converts to this type from the input type.