Struct kotlin_poet_rs::spec::Function
source · pub struct Function { /* private fields */ }
Implementations§
source§impl Function
impl Function
pub fn new<NameLike: Into<Name>>(name: NameLike) -> Function
pub fn visibility_modifier( self, visibility_modifier: VisibilityModifier, ) -> Function
pub fn operator(self, flag: bool) -> Function
pub fn parameter(self, parameter: Parameter) -> Function
pub fn body<CodeBlockLike: Into<CodeBlock>>( self, body: CodeBlockLike, ) -> Function
pub fn returns<TypeLike: Into<Type>>(self, returns: TypeLike) -> Function
pub fn receiver<TypeLike: Into<Type>>(self, receiver: TypeLike) -> Function
pub fn inheritance_modifier( self, inheritance_modifier: MemberInheritanceModifier, ) -> Function
pub fn generic_parameter(self, parameter: GenericParameter) -> Function
pub fn suspended(self, flag: bool) -> Function
pub fn inline(self, flag: bool) -> Function
pub fn overrides(self, flag: bool) -> Function
sourcepub fn annotation(self, annotation: Annotation) -> Self
pub fn annotation(self, annotation: Annotation) -> Self
Adds Annotation to this entity. They will appear in order this method is called.
Trait Implementations§
source§impl RenderKotlin for Function
impl RenderKotlin for Function
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 Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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
)