pub struct EntityDescriptor {
pub name: String,
pub table_name: String,
pub properties: Vec<PropertyDescriptor>,
pub relations: Vec<RelationDescriptor>,
}Fields§
§name: String§table_name: String§properties: Vec<PropertyDescriptor>§relations: Vec<RelationDescriptor>Implementations§
Source§impl EntityDescriptor
impl EntityDescriptor
pub fn new(name: impl Into<String>) -> Self
pub fn table_name(self, table_name: impl Into<String>) -> Self
pub fn property(self, property: PropertyDescriptor) -> Self
pub fn relation(self, relation: RelationDescriptor) -> Self
pub fn property_by_name(&self, name: &str) -> Option<&PropertyDescriptor>
pub fn relation_by_name(&self, name: &str) -> Option<&RelationDescriptor>
pub fn id_property(&self) -> Option<&PropertyDescriptor>
pub fn version_property(&self) -> Option<&PropertyDescriptor>
pub fn writable_properties(&self) -> impl Iterator<Item = &PropertyDescriptor>
Trait Implementations§
Source§impl Clone for EntityDescriptor
impl Clone for EntityDescriptor
Source§fn clone(&self) -> EntityDescriptor
fn clone(&self) -> EntityDescriptor
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 EntityDescriptor
impl Debug for EntityDescriptor
Source§impl PartialEq for EntityDescriptor
impl PartialEq for EntityDescriptor
Source§fn eq(&self, other: &EntityDescriptor) -> bool
fn eq(&self, other: &EntityDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for EntityDescriptor
impl StructuralPartialEq for EntityDescriptor
Auto Trait Implementations§
impl Freeze for EntityDescriptor
impl RefUnwindSafe for EntityDescriptor
impl Send for EntityDescriptor
impl Sync for EntityDescriptor
impl Unpin for EntityDescriptor
impl UnsafeUnpin for EntityDescriptor
impl UnwindSafe for EntityDescriptor
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