pub struct NodeAndContext<SE, PA>{
pub node: Node<SE, PA>,
pub cdata: PA::ContextData,
}Fields§
§node: Node<SE, PA>§cdata: PA::ContextDataImplementations§
Source§impl<SE, PA> NodeAndContext<SE, PA>
impl<SE, PA> NodeAndContext<SE, PA>
Sourcepub async fn fetch_entities(
&self,
collection_id: &CollectionId,
args: MatchArgs,
) -> Result<Vec<Entity>, RetrievalError>
pub async fn fetch_entities( &self, collection_id: &CollectionId, args: MatchArgs, ) -> Result<Vec<Entity>, RetrievalError>
Fetch a list of entities based on a selection
Sourcepub async fn commit_local_trx(
&self,
trx: &Transaction,
) -> Result<(), MutationError>
pub async fn commit_local_trx( &self, trx: &Transaction, ) -> Result<(), MutationError>
Does all the things necessary to commit a local transaction notably, the application of events to Entities works differently versus remote transactions
Trait Implementations§
Source§impl<SE: StorageEngine + Send + Sync + 'static, PA: PolicyAgent + Send + Sync + 'static> TContext for NodeAndContext<SE, PA>
impl<SE: StorageEngine + Send + Sync + 'static, PA: PolicyAgent + Send + Sync + 'static> TContext for NodeAndContext<SE, PA>
fn node_id(&self) -> EntityId
Source§fn create_entity(
&self,
collection: CollectionId,
trx_alive: Arc<AtomicBool>,
) -> Entity
fn create_entity( &self, collection: CollectionId, trx_alive: Arc<AtomicBool>, ) -> Entity
Create a brand new entity for a transaction, and add it to the WeakEntitySet
Note that this does not actually persist the entity to the storage engine
It merely ensures that there are no duplicate entities with the same ID (except forked entities)
fn check_write(&self, entity: &Entity) -> Result<(), AccessDenied>
fn get_entity<'life0, 'life1, 'async_trait>(
&'life0 self,
id: EntityId,
collection: &'life1 CollectionId,
cached: bool,
) -> Pin<Box<dyn Future<Output = Result<Entity, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_resident_entity(&self, id: EntityId) -> Option<Entity>
fn fetch_entities<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 CollectionId,
args: MatchArgs,
) -> Pin<Box<dyn Future<Output = Result<Vec<Entity>, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commit_local_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 Transaction,
) -> Pin<Box<dyn Future<Output = Result<(), MutationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query( &self, collection_id: CollectionId, args: MatchArgs, ) -> Result<EntityLiveQuery, RetrievalError>
fn collection<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = Result<StorageCollectionWrapper, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<SE, PA> Freeze for NodeAndContext<SE, PA>
impl<SE, PA> !RefUnwindSafe for NodeAndContext<SE, PA>
impl<SE, PA> Send for NodeAndContext<SE, PA>
impl<SE, PA> Sync for NodeAndContext<SE, PA>
impl<SE, PA> Unpin for NodeAndContext<SE, PA>
impl<SE, PA> UnsafeUnpin for NodeAndContext<SE, PA>
impl<SE, PA> !UnwindSafe for NodeAndContext<SE, PA>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.