pub struct EditBuilder<'a> { /* private fields */ }Expand description
Builder for constructing an Edit with operations.
Implementations§
Source§impl<'a> EditBuilder<'a>
impl<'a> EditBuilder<'a>
Adds an author to the edit.
Sets multiple authors at once.
Sourcepub fn created_at(self, timestamp: i64) -> Self
pub fn created_at(self, timestamp: i64) -> Self
Sets the creation timestamp (microseconds since Unix epoch).
Sourcepub fn created_now(self) -> Self
pub fn created_now(self) -> Self
Sets the creation timestamp to now.
Sourcepub fn create_entity<F>(self, id: Id, f: F) -> Self
pub fn create_entity<F>(self, id: Id, f: F) -> Self
Adds a CreateEntity operation using a builder function.
Sourcepub fn create_empty_entity(self, id: Id) -> Self
pub fn create_empty_entity(self, id: Id) -> Self
Adds a CreateEntity operation with no values.
Sourcepub fn update_entity<F>(self, id: Id, f: F) -> Self
pub fn update_entity<F>(self, id: Id, f: F) -> Self
Adds an UpdateEntity operation using a builder function.
Sourcepub fn delete_entity(self, id: Id) -> Self
pub fn delete_entity(self, id: Id) -> Self
Adds a DeleteEntity operation.
Sourcepub fn restore_entity(self, id: Id) -> Self
pub fn restore_entity(self, id: Id) -> Self
Adds a RestoreEntity operation.
Sourcepub fn create_relation_simple(
self,
id: Id,
from: Id,
to: Id,
relation_type: Id,
) -> Self
pub fn create_relation_simple( self, id: Id, from: Id, to: Id, relation_type: Id, ) -> Self
Adds a CreateRelation operation with an explicit ID.
Sourcepub fn create_relation<F>(self, f: F) -> Self
pub fn create_relation<F>(self, f: F) -> Self
Adds a CreateRelation operation with full control using a builder.
Sourcepub fn update_relation<F>(self, id: Id, f: F) -> Self
pub fn update_relation<F>(self, id: Id, f: F) -> Self
Adds an UpdateRelation operation using a builder function.
Sourcepub fn update_relation_position(
self,
id: Id,
position: Option<Cow<'a, str>>,
) -> Self
pub fn update_relation_position( self, id: Id, position: Option<Cow<'a, str>>, ) -> Self
Adds an UpdateRelation operation to only update the position.
Sourcepub fn delete_relation(self, id: Id) -> Self
pub fn delete_relation(self, id: Id) -> Self
Adds a DeleteRelation operation.
Sourcepub fn restore_relation(self, id: Id) -> Self
pub fn restore_relation(self, id: Id) -> Self
Adds a RestoreRelation operation.
Sourcepub fn ops(self, ops: impl IntoIterator<Item = Op<'a>>) -> Self
pub fn ops(self, ops: impl IntoIterator<Item = Op<'a>>) -> Self
Adds multiple raw operations.
Trait Implementations§
Source§impl<'a> Clone for EditBuilder<'a>
impl<'a> Clone for EditBuilder<'a>
Source§fn clone(&self) -> EditBuilder<'a>
fn clone(&self) -> EditBuilder<'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 moreAuto Trait Implementations§
impl<'a> Freeze for EditBuilder<'a>
impl<'a> RefUnwindSafe for EditBuilder<'a>
impl<'a> Send for EditBuilder<'a>
impl<'a> Sync for EditBuilder<'a>
impl<'a> Unpin for EditBuilder<'a>
impl<'a> UnwindSafe for EditBuilder<'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