Question about public function defined in modules

In Motoko, If a function is defined in a module, and it is defined as public, Can that function be accessed by anyone via canister call? Or can it only be accessed by files within the same project that the module is defined? I assume that modules are not canisters, and therefore they can’t be called via requests through the internet. But that’s an assumption. Can anyone confirm or deny this?

A function can only be called from external canisters only if it has a candid method defined.
Adding public modifier makes it only accessible to other modules.

2 Likes