11//! Property registration.
22
3+ use accessor:: { Getter , RawGetter , RawSetter , Setter } ;
4+ use invalid_accessor:: { InvalidGetter , InvalidSetter } ;
5+
36use crate :: core_types:: * ;
47use crate :: nativescript:: { Instance , NativeClass } ;
58use crate :: object:: ownership:: Shared ;
@@ -8,12 +11,11 @@ use crate::object::Ref;
811use crate :: private:: get_api;
912
1013use super :: { ClassBuilder , Export } ;
11- use accessor:: { Getter , InvalidGetter , InvalidSetter , RawGetter , RawSetter , Setter } ;
1214
1315mod accessor;
14- mod hint ;
16+ mod invalid_accessor ;
1517
16- pub use hint:: * ;
18+ pub mod hint;
1719
1820/// Metadata about the exported property.
1921#[ derive( Debug ) ]
@@ -57,7 +59,7 @@ pub struct PropertyBuilder<'a, C, T: Export, S = InvalidSetter<'a>, G = InvalidG
5759 getter : G ,
5860 default : Option < T > ,
5961 hint : Option < T :: Hint > ,
60- usage : Usage ,
62+ usage : PropertyUsage ,
6163 class_builder : & ' a ClassBuilder < C > ,
6264}
6365
7577 getter : InvalidGetter :: new ( name) ,
7678 default : None ,
7779 hint : None ,
78- usage : Usage :: DEFAULT ,
80+ usage : PropertyUsage :: DEFAULT ,
7981 class_builder,
8082 }
8183 }
@@ -267,14 +269,14 @@ where
267269
268270 /// Sets a property usage.
269271 #[ inline]
270- pub fn with_usage ( mut self , usage : Usage ) -> Self {
272+ pub fn with_usage ( mut self , usage : PropertyUsage ) -> Self {
271273 self . usage = usage;
272274 self
273275 }
274276}
275277
276278bitflags:: bitflags! {
277- pub struct Usage : u32 {
279+ pub struct PropertyUsage : u32 {
278280 const STORAGE = sys:: godot_property_usage_flags_GODOT_PROPERTY_USAGE_STORAGE as u32 ;
279281 const EDITOR = sys:: godot_property_usage_flags_GODOT_PROPERTY_USAGE_EDITOR as u32 ;
280282 const NETWORK = sys:: godot_property_usage_flags_GODOT_PROPERTY_USAGE_NETWORK as u32 ;
@@ -299,7 +301,7 @@ bitflags::bitflags! {
299301 }
300302}
301303
302- impl Usage {
304+ impl PropertyUsage {
303305 #[ inline]
304306 pub fn to_sys ( self ) -> sys:: godot_property_usage_flags {
305307 self . bits ( ) as sys:: godot_property_usage_flags
@@ -458,7 +460,7 @@ mod impl_export {
458460 }
459461
460462 impl Export for VariantArray < Shared > {
461- type Hint = ArrayHint ;
463+ type Hint = hint :: ArrayHint ;
462464
463465 #[ inline]
464466 fn export_info ( hint : Option < Self :: Hint > ) -> ExportInfo {
0 commit comments