Enum kotlin_poet_rs::spec::Type
source · pub enum Type {
ClassLike(ClassLikeType),
Function(FunctionType),
Generic(Name),
}
Expand description
Kotlin fully resolved / qualified type
Variants§
ClassLike(ClassLikeType)
Type that behaves like class (e.g. kotlin.String
, kotlin.collections.List<String>
)
Function(FunctionType)
Functional type (e.g. (Int) -> String
)
Generic(Name)
Generic argument as type (e.g. T
)
Implementations§
Trait Implementations§
source§impl From<ClassLikeType> for Type
impl From<ClassLikeType> for Type
source§fn from(value: ClassLikeType) -> Self
fn from(value: ClassLikeType) -> Self
Converts to this type from the input type.
source§impl From<ClassLikeTypeName> for Type
impl From<ClassLikeTypeName> for Type
source§fn from(value: ClassLikeTypeName) -> Self
fn from(value: ClassLikeTypeName) -> Self
Converts to this type from the input type.
source§impl RenderKotlin for Type
impl RenderKotlin for Type
source§fn render_string(&self) -> String
fn render_string(&self) -> String
Shortcut method for converting RenderKotlin::render_into output into String.
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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
)