pub struct CodeText(_);
Implementations
sourceimpl CodeText
impl CodeText
pub fn new(s: &str) -> Self
pub fn new_reexport(name: &str, path: &str) -> Self
pub fn new_named_reexport(name: &str, path: &str) -> Self
pub fn new_fields_export(name: &str, fields: &str) -> Self
pub fn append_newline(&self) -> Self
sourcepub fn new_const_export<T>(name: &str, value: &T) -> Result<Self> where
T: ?Sized + Serialize,
pub fn new_const_export<T>(name: &str, value: &T) -> Result<Self> where
T: ?Sized + Serialize,
Creates a export const {name} = {value} as const
statement.
pub fn try_join_with_separator<'a, I>(
values: I,
separator: &str
) -> Result<CodeText> where
I: IntoIterator<Item = &'a CodeText>,
pub fn docs(&self, docs: &str) -> CodeText
pub fn module_docs(&self, docs: &str) -> CodeText
Trait Implementations
sourceimpl Codegen for CodeText
impl Codegen for CodeText
fn generate_typescript(&self, _ctx: &CodegenContext<'_>) -> Result<String>
sourceimpl Ord for CodeText
impl Ord for CodeText
sourceimpl PartialOrd<CodeText> for CodeText
impl PartialOrd<CodeText> for CodeText
sourcefn partial_cmp(&self, other: &CodeText) -> Option<Ordering>
fn partial_cmp(&self, other: &CodeText) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for CodeText
impl StructuralEq for CodeText
impl StructuralPartialEq for CodeText
Auto Trait Implementations
impl RefUnwindSafe for CodeText
impl Send for CodeText
impl Sync for CodeText
impl Unpin for CodeText
impl UnwindSafe for CodeText
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToHex for T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
sourcefn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more