pub struct Memory { /* private fields */ }Expand description
Fixed-capacity memory. Current-tick sight always takes precedence over hearing. Older hearing can update a remembered position; it never grants current sight.
Implementations§
Source§impl Memory
impl Memory
pub fn new(settings: MemorySettings) -> Result<Memory, AiError>
pub fn advance(&mut self, dt: f32) -> Result<(), AiError>
pub fn observe( &mut self, target: Candidate, sense: Sense, ) -> Result<bool, AiError>
pub fn tracks(&self) -> &[Track]
pub fn get(&self, id: u64) -> Option<&Track>
pub fn forget(&mut self, id: u64)
pub fn clear(&mut self)
pub fn dropped(&self) -> u64
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
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