#[non_exhaustive]pub struct EntityRelation {
pub subject_id: String,
pub object_id: String,
pub relation: String,
/* private fields */
}Expand description
Relationship between Entities.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.subject_id: StringSubject entity id.
object_id: StringObject entity id.
relation: StringRelationship description.
Implementations§
Source§impl EntityRelation
impl EntityRelation
pub fn new() -> Self
Sourcepub fn set_subject_id<T: Into<String>>(self, v: T) -> Self
pub fn set_subject_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_object_id<T: Into<String>>(self, v: T) -> Self
pub fn set_object_id<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for EntityRelation
impl Clone for EntityRelation
Source§fn clone(&self) -> EntityRelation
fn clone(&self) -> EntityRelation
Returns a duplicate of the value. Read more
1.0.0 · 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 EntityRelation
impl Debug for EntityRelation
Source§impl Default for EntityRelation
impl Default for EntityRelation
Source§fn default() -> EntityRelation
fn default() -> EntityRelation
Returns the “default value” for a type. Read more
Source§impl Message for EntityRelation
impl Message for EntityRelation
Source§impl PartialEq for EntityRelation
impl PartialEq for EntityRelation
impl StructuralPartialEq for EntityRelation
Auto Trait Implementations§
impl Freeze for EntityRelation
impl RefUnwindSafe for EntityRelation
impl Send for EntityRelation
impl Sync for EntityRelation
impl Unpin for EntityRelation
impl UnwindSafe for EntityRelation
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