pub enum KtPropertyValue {
None,
Initializer(KtCode),
Delegate(KtCode),
}Expand description
A property’s value: no value, an initializer, or a delegate.
Replaces the old two-Option<String> fields — a sum, so the illegal
state (both set at once) is unrepresentable.
Variants§
None
No value — an abstract property, or one with only accessors.
Initializer(KtCode)
val x = <expr>.
Delegate(KtCode)
val x by <expr> (e.g. lazy { … }).
Implementations§
Source§impl KtPropertyValue
impl KtPropertyValue
pub fn collect_imports(&self, sink: &mut Vec<String>)
Trait Implementations§
Source§impl Clone for KtPropertyValue
impl Clone for KtPropertyValue
Source§fn clone(&self) -> KtPropertyValue
fn clone(&self) -> KtPropertyValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KtPropertyValue
impl Debug for KtPropertyValue
Source§impl Default for KtPropertyValue
impl Default for KtPropertyValue
Source§fn default() -> KtPropertyValue
fn default() -> KtPropertyValue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KtPropertyValue
impl RefUnwindSafe for KtPropertyValue
impl Send for KtPropertyValue
impl Sync for KtPropertyValue
impl Unpin for KtPropertyValue
impl UnsafeUnpin for KtPropertyValue
impl UnwindSafe for KtPropertyValue
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