pub struct EntityConfigRegistration {
pub type_id: TypeId,
pub type_name: &'static str,
pub apply_fn: fn(&mut ModelBuilder),
pub context_key: Option<&'static str>,
}Expand description
Type-erased registration for an IEntityTypeConfiguration<T> impl block.
Emitted by the #[entity(T)] attribute macro. The apply_fn
instantiates the configuration via Default::default() and invokes
IEntityTypeConfiguration::configure(&mut EntityTypeBuilder) on a
freshly-borrowed ModelBuilder.
Fields§
§type_id: TypeId§type_name: &'static str§apply_fn: fn(&mut ModelBuilder)§context_key: Option<&'static str>Which DbContext key this configuration applies to.
None = default context; Some("key") = keyed context.
Set by #[entity(T, "key")] attribute’s optional second argument.
Trait Implementations§
Source§impl Clone for EntityConfigRegistration
impl Clone for EntityConfigRegistration
Source§fn clone(&self) -> EntityConfigRegistration
fn clone(&self) -> EntityConfigRegistration
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 moreimpl Collect for EntityConfigRegistration
impl Copy for EntityConfigRegistration
Auto Trait Implementations§
impl Freeze for EntityConfigRegistration
impl RefUnwindSafe for EntityConfigRegistration
impl Send for EntityConfigRegistration
impl Sync for EntityConfigRegistration
impl Unpin for EntityConfigRegistration
impl UnsafeUnpin for EntityConfigRegistration
impl UnwindSafe for EntityConfigRegistration
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