Comment

Comment by yobbo

Db access in rust typically needs some sort of handle and a mutex. Limiting access to the handle makes the rest of the code pure with respect to the db. The handle plays a similar role to the IO type.

Actor-like patterns makes this nice. Message-objects can be passed to/from a module with db-access or other io.

parent yobbo 10 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton