Skip to content

Update extensions to be cloneable #395

@LucioFranco

Description

@LucioFranco

I propose that we move forward to allow Request<B: Clone> to impl Clone. The big blocker here is that extensions is not clonable. This could be fixed by making a AnyClone trait:

pub trait AnyClone: Any + Clone {}

The downside here is that all things you store in extensions is cloneable but I think this is a fair trade off since mostly its just information that could be thrown behind an arc or bytes.

cc @seanmonstar @carllerche @hawkw @davidbarsky

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-extensionsArea: Request and Response ExtensionsB-breakingBlocked: breaking change. This requires a breaking change.S-featureSeverity: feature. This adds something new.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions