Resolve url from inside template Can I resolve full URL to some object - entry or category, from inside Twig template?

Mind you, I don't mean searching for something by slug, but by full URL. So, for example, instead of passing 'some-slug' to function, i want to pass 'some-category/some-subcategory/some-slug'.

I need to to this, because i want to create breadcrumbs links based on craft.request.segments object. So, i need to look up for entry object for some-category, then entry for some-category/some-subcategory/ and then for some-category/some-subcategory/some-slug (well, i dont really need last one because its just page im on currently).
Usually I have a {{baseUrl}} defined in config or .env available globally;
then {{baseUrl}}/{{entry.uri}}