#[repr(C)]pub struct Person {
pub last_name: Key<Surname>,
pub father: Option<Key<Person>>,
pub mother: Option<Key<Person>>,
pub name: String,
pub dog: Set64<Key<Dog>>,
}
Fields§
§last_name: Key<Surname>
§father: Option<Key<Person>>
father
is a one-to-many relationship
mother: Option<Key<Person>>
mother
is a one-to-many relationship
name: String
We use a raw String for given name, since we don’t care to
iterate over all “Davids”. Otherwise we’d do the same as with Surname
.
dog: Set64<Key<Dog>>
dog
is a many-to-many relationship
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Person
impl RefUnwindSafe for Person
impl Send for Person
impl Sync for Person
impl Unpin for Person
impl UnwindSafe for Person
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