Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: Adds a BoxCloneServiceLayer #708

Merged
merged 3 commits into from
Nov 4, 2022

Conversation

alexrudy
Copy link
Contributor

@alexrudy alexrudy commented Nov 1, 2022

This layer is similar to a BoxLayer, but produces a BoxCloneService instead, so can be used when the underlying layers must be clone.

Resolves #707

This layer is similar to a BoxLayer, but produces a BoxCloneService instead, so can be used when
the underlying layers must be clone.
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this seems useful but I'm not a fan of the name BoxCloneLayer. It sounds like the layer is Clone but in fact it's the service it produces that is Clone.

BoxLayer is already Clone.

@LucioFranco
Copy link
Member

Should we name it CloneBoxLayer?

@alexrudy
Copy link
Contributor Author

alexrudy commented Nov 1, 2022

Happy for whatever name you want. BoxCloneServiceLayer is another option, but that's a mouthful.

I will clarify in the docs for this type that BoxLayer is already clone, but that the services it produces are not clone.

@LucioFranco
Copy link
Member

yeah I like that BoxCloneServiceLayer since that matches what https://docs.rs/tower/latest/tower/util/struct.BoxCloneService.html is named as well.

@LucioFranco LucioFranco changed the title util: Adds a BoxCloneLayer util: Adds a BoxCloneServiceLayer Nov 3, 2022
@LucioFranco LucioFranco merged commit 787f5dd into tower-rs:master Nov 4, 2022
@LucioFranco
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sharing Collections of Layers: BoxCloneLayer?
3 participants