Struct kotlin_poet_rs::spec::Name
source · pub struct Name { /* private fields */ }
Expand description
Kotlin identifier name, automatically escaped with backticks if it contains escapable tokens
§Examples
use std::str::FromStr;
use kotlin_poet_rs::io::RenderKotlin;
use kotlin_poet_rs::spec::Name;
let name = Name::from("Foo");
assert_eq!(name.render_string(), "Foo");
let escaped_name = Name::from("Foo Bar");
assert_eq!(escaped_name.render_string(), "`Foo Bar`")
Trait Implementations§
source§impl RenderKotlin for Name
impl RenderKotlin for Name
source§fn render_string(&self) -> String
fn render_string(&self) -> String
Shortcut method for converting RenderKotlin::render_into output into String.
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)