pub struct AlignmentChecker { /* private fields */ }Expand description
The alignment checker
Implementations§
Source§impl AlignmentChecker
impl AlignmentChecker
pub fn new() -> Self
Sourcepub fn check_command(
&self,
agent: &AgentId,
cmd: &Command,
engine: &Engine,
) -> Result<(), String>
pub fn check_command( &self, agent: &AgentId, cmd: &Command, engine: &Engine, ) -> Result<(), String>
Check all alignment constraints for a command
Sourcepub fn check_exit_constraint(&self, _source: &RoomId, _target: &RoomId) -> bool
pub fn check_exit_constraint(&self, _source: &RoomId, _target: &RoomId) -> bool
Check exit constraint (CONSTRAINT 5)
Sourcepub fn check_tile_creation(&mut self, tile: &Tile) -> Result<(), String>
pub fn check_tile_creation(&mut self, tile: &Tile) -> Result<(), String>
Check tile creation against alignment constraints
Sourcepub fn check_zeitgeist_merge(
&self,
local: &Zeitgeist,
incoming: &Zeitgeist,
) -> Result<(), String>
pub fn check_zeitgeist_merge( &self, local: &Zeitgeist, incoming: &Zeitgeist, ) -> Result<(), String>
Check zeitgeist merge properties (CONSTRAINT 6)
Sourcepub fn violations(&self) -> &[AlignmentReport]
pub fn violations(&self) -> &[AlignmentReport]
Get the violation log
Sourcepub fn list_constraints() -> Vec<String>
pub fn list_constraints() -> Vec<String>
List all constraints
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AlignmentChecker
impl RefUnwindSafe for AlignmentChecker
impl Send for AlignmentChecker
impl Sync for AlignmentChecker
impl Unpin for AlignmentChecker
impl UnsafeUnpin for AlignmentChecker
impl UnwindSafe for AlignmentChecker
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