pub struct PropertyBuilder<'a, C, T: Export, S = InvalidSetter<'a>, G = InvalidGetter<'a>> { /* private fields */ }
Expand description

Builder type used to register a property on a NativeClass.

Implementations§

Register the property built with this builder.

Provides a setter function with the signature fn(&mut C, owner: C::Base, value: T) where C is the NativeClass type being registered and T is the type of the property.

Provides a setter function with the signature fn(&C, owner: C::Base, value: T) where C is the NativeClass type being registered and T is the type of the property.

“shr” stands for “shared reference”, as opposed to the more common &mut self.

Provides a getter function with the signature fn(&C, owner: C::Base) -> T, where C is the NativeClass type being registered and T is the type of the property.

Provides a getter function with the signature fn(&C, owner: C::Base) -> &T, where C is the NativeClass type being registered and T is the type of the property.

Provides a getter function with the signature fn(&mut C, owner: C::Base) -> T, where C is the NativeClass type being registered and T is the type of the property.

Provides a getter function with the signature fn(&mut C, owner: C::Base) -> &T, where C is the NativeClass type being registered and T is the type of the property.

Sets a default value for the property as a hint to the editor. The setter may or may not be actually called with this value.

Sets an editor hint.

Sets a property usage.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.