# Binds The `Binds` trait defines how an actor's ports are associated with the message types it can receive remotely. ```rust pub trait Binds: RemoteActor { fn bind(ports: &Ports); } ``` Implementing `Binds` allows the system to determine which messages can be routed to an actor instance of type `A`. ## Code Generation In most cases, you do not implement this trait manually. Instead, the `#[export]` macro generates the appropriate `Binds` implementation by registering the actor's supported message types. For example: ```rust #[hyperactor::export( spawn = true, handlers = [ShoppingList], )] struct ShoppingListActor; ``` Expands to: ```rust impl Binds for ShoppingListActor { fn bind(ports: &Ports) { ports.bind::(); } } ``` This ensures that the actor is correctly wired to handle messages of type `ShoppingList` when used in a remote messaging context.