pub struct SimulationView<'a> { /* private fields */ }Implementations§
Source§impl SimulationView<'_>
impl SimulationView<'_>
pub const fn time(&self) -> SimTime
pub fn army(&self, id: ArmyId) -> Result<Option<&Army>, CanwuError>
pub fn person(&self, id: PersonId) -> Result<Option<&Person>, CanwuError>
pub fn government( &self, id: GovernmentId, ) -> Result<Option<&Government>, CanwuError>
pub fn territory( &self, id: TerritoryId, ) -> Result<Option<&Territory>, CanwuError>
pub fn route(&self, id: RouteId) -> Result<Option<&Route>, CanwuError>
pub fn actor_knowledge( &self, actor: PersonId, ) -> Result<Option<&ActorKnowledge>, CanwuError>
Sourcepub fn command(
&self,
id: CommandId,
) -> Result<Option<&CommandRecord>, CanwuError>
pub fn command( &self, id: CommandId, ) -> Result<Option<&CommandRecord>, CanwuError>
Resolves an exact command ID from the retained runtime journal in O(1).
A command that has already been sealed into a live archive is not
available through this view and returns None.
Sourcepub fn event(&self, id: EventId) -> Result<Option<&SimEvent>, CanwuError>
pub fn event(&self, id: EventId) -> Result<Option<&SimEvent>, CanwuError>
Resolves an exact event ID from the retained runtime journal in O(1).
An event that has already been sealed into a live archive is not
available through this view and returns None.
pub fn ingress( &self, id: IngressId, ) -> Result<Option<&IngressRecord>, CanwuError>
pub fn domain_record( &self, reference: &DomainRecordRef, ) -> Result<Option<&DomainRecord>, CanwuError>
pub fn typed_domain_record<T: DomainRecordType>( &self, reference: &TypedDomainRecordRef<T>, ) -> Result<Option<&DomainRecord>, CanwuError>
pub fn proposed_domain_record( &self, reference: &DomainRecordRef, ) -> Result<Option<&DomainRecord>, CanwuError>
pub fn proposed_typed_domain_record<T: DomainRecordType>( &self, reference: &TypedDomainRecordRef<T>, ) -> Result<Option<&DomainRecord>, CanwuError>
pub fn reservation( &self, reservation: &ReservationRef, ) -> Result<Option<&ReservationAllocation>, CanwuError>
pub fn random_range( &self, stream: &RandomStreamKey, upper_exclusive: u64, purpose: &str, ) -> Result<u64, CanwuError>
pub fn component( &self, state: &StateKey, entity: &EntityRef, component: &str, ) -> Result<Option<&Value>, CanwuError>
pub fn proposed_component( &self, state: &StateKey, entity: &EntityRef, component: &str, ) -> Result<Option<&Value>, CanwuError>
Auto Trait Implementations§
impl<'a> !Freeze for SimulationView<'a>
impl<'a> !RefUnwindSafe for SimulationView<'a>
impl<'a> !Sync for SimulationView<'a>
impl<'a> Send for SimulationView<'a>
impl<'a> Unpin for SimulationView<'a>
impl<'a> UnsafeUnpin for SimulationView<'a>
impl<'a> UnwindSafe for SimulationView<'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