use super :: *;
pub mod private
{
use super :: *;
impl< T > Instance for Vec< T >
where
CollectionDescriptor< Vec< T > > : Entity,
{
type Entity = CollectionDescriptor :: < Vec< T > >;
fn _reflect( &self ) -> Self ::Entity
{
CollectionDescriptor :: < Self > ::new( self.len() )
}
#[ inline( always ) ]
fn Reflect() -> Self ::Entity
{
CollectionDescriptor :: < Self > ::new( 0 )
}
}
impl< T > Entity for CollectionDescriptor< Vec< T > >
where
T: 'static + Instance,
{
#[ inline( always ) ]
fn is_container( &self ) -> bool
{
true
}
#[ inline( always ) ]
fn len( &self ) -> usize
{
self.len
}
#[ inline( always ) ]
fn type_name( &self ) -> &'static str
{
core ::any ::type_name :: < Vec< T > >()
}
#[ inline( always ) ]
fn type_id( &self ) -> core ::any ::TypeId
{
core ::any ::TypeId ::of :: < Vec< T > >()
}
#[ inline( always ) ]
fn elements( &self ) -> Box< dyn Iterator< Item = KeyVal > >
{
let result: Vec< KeyVal > = ( 0 .. self.len() )
.map( | k | KeyVal { key: Primitive ::usize( k ), val: Box ::new( < T as Instance > ::Reflect() ) } )
.collect();
Box ::new( result.into_iter() )
}
}
}
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use own :: *;
#[ allow( unused_imports ) ]
pub mod own
{
use super :: *;
#[ doc( inline ) ]
pub use orphan :: *;
}
#[ allow( unused_imports ) ]
pub mod orphan
{
use super :: *;
#[ doc( inline ) ]
pub use exposed :: *;
}
#[ allow( unused_imports ) ]
pub mod exposed
{
use super :: *;
#[ doc( inline ) ]
pub use prelude :: *;
}
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use exposed :: *;
#[ allow( unused_imports ) ]
pub mod prelude
{
use super :: *;
}