pub struct UpdateRelation<'a> {
pub id: Id,
pub from_space: Option<Id>,
pub from_version: Option<Id>,
pub to_space: Option<Id>,
pub to_version: Option<Id>,
pub position: Option<Cow<'a, str>>,
pub unset: Vec<UnsetRelationField>,
pub context: Option<Context>,
}Expand description
Updates a relation’s mutable fields (spec Section 3.3).
The structural fields (entity, type, from, to) are immutable. The space pins, version pins, and position can be updated or unset.
Fields§
§id: IdThe relation to update.
from_space: Option<Id>Set space pin for source entity.
from_version: Option<Id>Set version pin for source entity.
to_space: Option<Id>Set space pin for target entity.
to_version: Option<Id>Set version pin for target entity.
position: Option<Cow<'a, str>>Set position for ordering.
unset: Vec<UnsetRelationField>Fields to clear/unset.
context: Option<Context>Optional context for grouping changes (spec Section 4.5).
Implementations§
Trait Implementations§
Source§impl<'a> Clone for UpdateRelation<'a>
impl<'a> Clone for UpdateRelation<'a>
Source§fn clone(&self) -> UpdateRelation<'a>
fn clone(&self) -> UpdateRelation<'a>
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<'a> Debug for UpdateRelation<'a>
impl<'a> Debug for UpdateRelation<'a>
Source§impl<'a> Default for UpdateRelation<'a>
impl<'a> Default for UpdateRelation<'a>
Source§fn default() -> UpdateRelation<'a>
fn default() -> UpdateRelation<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for UpdateRelation<'a>
impl<'a> PartialEq for UpdateRelation<'a>
impl<'a> StructuralPartialEq for UpdateRelation<'a>
Auto Trait Implementations§
impl<'a> Freeze for UpdateRelation<'a>
impl<'a> RefUnwindSafe for UpdateRelation<'a>
impl<'a> Send for UpdateRelation<'a>
impl<'a> Sync for UpdateRelation<'a>
impl<'a> Unpin for UpdateRelation<'a>
impl<'a> UnwindSafe for UpdateRelation<'a>
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