<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl" -->

---
title: The limitations of proxies | daily.dev
description: The final post in the persian-rug series examines the two main limitations of the crate: lack of deletion support and lack of enforced matching between proxies...
canonical: https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The limitations of proxies | daily.dev
og:description: The final post in the persian-rug series examines the two main limitations of the crate: lack of deletion support and lack of enforced matching between proxies...
og:url: https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl
og:image: https://api.daily.dev/og/posts/aw7sqZiTL.png
og:image:alt: The limitations of proxies
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The limitations of proxies

**[Collabora Blog](https://daily.dev/sources/collabora)** · 5 min read · 0 upvotes · 0 comments

## Summary

The final post in the persian-rug series examines the two main limitations of the crate: lack of deletion support and lack of enforced matching between proxies and containers. It surveys comparable Rust crates — indextree, slotmap, typed_index_collections, and ghost-cell — analyzing how each handles deletion and container-instance safety. The post concludes that deletion support involves real trade-offs (either fallible proxy lookups or complex handle-tracking), and that ghost-cell's compile-time instance checking via lifetime abuse is ingenious but impractical without first-class language support for branded types. Runtime checking is presented as the more feasible path forward. Persian-rug's key differentiator is its support for heterogeneous object graphs with a lighter API.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2024/01/23/persian-rug-part-4-the-limitations-of-proxies>

## Questions this post answers

### How does ghost-cell enforce that handles from one container instance aren't used with another in Rust?

ghost-cell uses a clever abuse of Rust's lifetime mechanism to make each token instance effectively its own distinct type at compile time, so the compiler catches accidental mismatches between instances. This is called 'branding'. The trade-off is that this approach is considered a hack and may be hard to maintain; first-class language support for branded types would be needed to make it truly practical.

_Rust developers navigating arena and object-graph crate choices track discussions like this on daily.dev._

### What are the trade-offs of adding deletion support to an arena-based Rust crate like persian-rug?

Two approaches exist: allow proxy lookups to fail (as slotmap and indextree do), or track and wipe all handles when data is removed. The first adds noise or forces callers to handle missing objects, leaving the graph in an inconsistent state. The second requires all proxy holders to implement a trait for wiping, splitting proxies into managed (inside the collection) and fallible (outside) variants — significantly increasing crate complexity.

_Teams choosing between Rust arena crates for production object graphs find comparative analysis like this on daily.dev._

## Similar posts on daily.dev

- [Beyond Memory Safety: What Makes Rust Different – Lessons from Autonomous Robotics](https://daily.dev/posts/beyond-memory-safety-what-makes-rust-different-lessons-from-autonomous-robotics-ivljxogzh) · InfoQ · 0 upvotes · 0 comments
- [Choosing Rust for All the Wrong Reasons \(Diary of a Mercenary\)](https://daily.dev/posts/choosing-rust-for-all-the-wrong-reasons-diary-of-a-mercenary--p8m8obyxf) · Medium · 3 upvotes · 0 comments
- [A look at Rust from 2012](https://daily.dev/posts/a-look-at-rust-from-2012-2wlds6cew) · Lobsters · 1 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#data-structures](https://daily.dev/tags/data-structures)

[View this post on daily.dev](https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The limitations of proxies","url":"https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl"},"datePublished":"2026-08-11T08:54:35.400Z","dateModified":"2026-08-11T09:18:09.200Z","description":"The final post in the persian-rug series examines the two main limitations of the crate: lack of deletion support and lack of enforced matching between proxies...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d362d3c14a24e504cbd854359a16b708?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d362d3c14a24e504cbd854359a16b708?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rust,data-structures","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"The limitations of proxies"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-limitations-of-proxies-aw7sqzitl#faq","mainEntity":[{"@type":"Question","name":"How does ghost-cell enforce that handles from one container instance aren't used with another in Rust?","acceptedAnswer":{"@type":"Answer","text":"ghost-cell uses a clever abuse of Rust's lifetime mechanism to make each token instance effectively its own distinct type at compile time, so the compiler catches accidental mismatches between instances. This is called 'branding'. The trade-off is that this approach is considered a hack and may be hard to maintain; first-class language support for branded types would be needed to make it truly practical. Rust developers navigating arena and object-graph crate choices track discussions like this on daily.dev."}},{"@type":"Question","name":"What are the trade-offs of adding deletion support to an arena-based Rust crate like persian-rug?","acceptedAnswer":{"@type":"Answer","text":"Two approaches exist: allow proxy lookups to fail (as slotmap and indextree do), or track and wipe all handles when data is removed. The first adds noise or forces callers to handle missing objects, leaving the graph in an inconsistent state. The second requires all proxy holders to implement a trait for wiping, splitting proxies into managed (inside the collection) and fallible (outside) variants — significantly increasing crate complexity. Teams choosing between Rust arena crates for production object graphs find comparative analysis like this on daily.dev."}}]}
```

