As a Rust beginner, I understood lifetimes backwards, thinking <'a> means I’m declaring a lifetime which I then use.
What that actually declares is a placeholder for a lifetime the compiler will attempt to find wherever that variable or function is used, just as it would attempt to find a valid type for a generic type <T> at the points of usage.
In this sense, lifetimes and generics are similar concepts: code is generic over some lifetimes just as it can be generic over some type (thanks to wrs for making me realise this).
~/.lldbinitUseful commands:
cargo build to build the programlldb <program> where <program> is the built binary, e.g. in my uno project: lldb ./target/debug/unohelp to see available commandsapropros ... to find help specific to a search term, e.g. apropros breakpointbreakpoint set ... (or b), e.g. breakpoint set mainbreakpoint listbreakpoint delete to delete a specific or all breakpointsbreakpoint command add to add a command to run when the breakpoint is hit (e.g. printing a variable value)breakpoint disable to disable the breakpoint without deleting itbreakpoint enablerun (or r) to run the programnext (or n) to run next linelist (or l) to list source codestep (or s) to step into a functioncontinue (or c) to continue execution, until next breakpoint if setthread until <line-no> run until line number, like setting and continuing until a one-off breakpoint, useful for stepping out of a loop or function, similar to tbreakprint (or p) for printing a variableframe variable [<variable-name>] to print a specific or all variableswatchpoint for managing watchpoints for watching and stopping based on specific conditions for state of variables<leader>db for setting a breakpoint and <leader>dc for launching the programlldb commands from above, navigate to dap-repl window in the nvim-dap UI and switch to insert mode using i