Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

types: `AnyView` has none of `Any`'s type-URL helpers

Open Beginner friendly
#643 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@farmer-data is already working on this.

Since Oct 17, 2026.

  • #734 by @farmer-data — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
api

Research direction

Start in buffa-types/src/any_ext.rs: read how Any implements type_name, is_message, is_type, unpack_message and unpack_if, especially the documented split rule (text after the last /, no name for URLs without / or with an empty name). Then locate the generated AnyView<'a> definition and its decode_view entry point to see what its two borrowed fields offer. Done means AnyView exposes the same five helpers by sharing the split logic with Any::type_name, with tests covering the split edge cases and unpack decoding from the borrowed value; run the crate's test suite (cargo test) to confirm.

Written by the indexing model from the issue text.

Description

enhancement

Any has type_name(), is_message::<T>(), is_type(), unpack_message::<T>() and unpack_if() (buffa-types/src/any_ext.rs). The generated AnyView<'a> has only its two fields, type_url: &'a str and value: &'a [u8], so code that holds a decoded view repeats the URL split by hand or converts to an owned Any first:

let view = AnyView::decode_view(bytes)?;
// view.is_message::<Duration>() does not exist
let is_duration =
    view.type_url.rsplit_once('/').map(|(_, name)| name) == Some(Duration::FULL_NAME);

A view is what a zero-copy handler dispatches on, so the type test is the first thing it needs. The hand-written split also has to repeat the rule that Any::type_name documents: the name is the text after the last /, and a URL with no / or with an empty name has no type name.

Proposed: inherent type_name, is_message, is_type, unpack_message and unpack_if on AnyView, sharing the split with Any::type_name. They allocate only what the unpacked message needs: unpack_message decodes from the borrowed value.

Dominant language
Rust
Stars
927
Forks
119
Avg merge
3d 6h
Merged PRs (30d)
152

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/buffa

All issues in anthropics/buffa

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.