pub struct Repository<S: Store> { /* private fields */ }Implementations§
Source§impl<S: Store> Repository<S>
impl<S: Store> Repository<S>
pub fn new(store: S, validator: Validator) -> Self
pub fn with_clock(self, clock: impl Clock + 'static) -> Self
pub fn store(&self) -> &S
pub fn validator(&self) -> &Validator
pub fn now(&self) -> Timestamp
pub fn get(&self, id: &RecordId) -> Result<Record>
pub fn find(&self, id: &RecordId) -> Result<Option<Record>>
pub fn history(&self, id: &RecordId) -> Result<Vec<Event>>
pub fn timeline(&self, id: &RecordId) -> Result<Vec<TimelineEntry>>
pub fn list(&self, query: &RecordQuery) -> Result<Vec<Record>>
pub fn incoming(&self, id: &RecordId) -> Result<Vec<IncomingEdge>>
pub fn create(&mut self, draft: RecordDraft, meta: Meta) -> Result<Committed>
pub fn amend( &mut self, id: &RecordId, changes: Vec<Change>, meta: Meta, ) -> Result<Committed>
pub fn correct( &mut self, id: &RecordId, changes: Vec<Change>, corrects: Option<EventId>, meta: Meta, ) -> Result<Committed>
pub fn set_extension_field( &mut self, id: &RecordId, namespace: &str, field: &str, value: Option<ExtValue>, meta: Meta, ) -> Result<Committed>
pub fn link( &mut self, source: &RecordId, draft: RelationDraft, meta: Meta, ) -> Result<Committed>
pub fn unlink( &mut self, source: &RecordId, relation_id: RelationId, meta: Meta, ) -> Result<Committed>
pub fn retract(&mut self, id: &RecordId, meta: Meta) -> Result<Committed>
pub fn supersede( &mut self, id: &RecordId, by: &RecordId, meta: Meta, ) -> Result<Committed>
pub fn redact( &mut self, id: &RecordId, fields: Vec<FieldPath>, meta: Meta, ) -> Result<Committed>
pub fn annotate( &mut self, id: &RecordId, name: NamespacedName, data: BTreeMap<String, ExtValue>, meta: Meta, ) -> Result<Committed>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for Repository<S>
impl<S> !UnwindSafe for Repository<S>
impl<S> Freeze for Repository<S>where
S: Freeze,
impl<S> Send for Repository<S>
impl<S> Sync for Repository<S>where
S: Sync,
impl<S> Unpin for Repository<S>where
S: Unpin,
impl<S> UnsafeUnpin for Repository<S>where
S: UnsafeUnpin,
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