Struct kotlin_poet_rs::spec::Comment
source · pub struct Comment { /* private fields */ }
Expand description
Represents a ‘normal’, non documentation comment in Kotlin.
Entities that support comments should usually store them as Vec
§Example
use kotlin_poet_rs::spec::Comment;
use kotlin_poet_rs::io::RenderKotlin;
let comment = Comment::new()
.append("Hello, World!");
assert_eq!(
"// Hello, World!",
comment.render_string()
)
Implementations§
Trait Implementations§
source§impl RenderKotlin for Comment
impl RenderKotlin for Comment
source§fn render_string(&self) -> String
fn render_string(&self) -> String
Shortcut method for converting RenderKotlin::render_into output into String.
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnwindSafe for Comment
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
)