You can pass methods as functions or closures by Type::method. The first argument will be the self argument.<p>I don&#x27;t see much of an alternative to panic on bounds checked indexing error, short of not providing indexing at all or developing a system of proven indices that would be extremely unfriendly to newcomers, see this project: <a href="https:&#x2F;&#x2F;github.com&#x2F;bluss&#x2F;indexing" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bluss&#x2F;indexing</a>