Comments (2)
@ariesdevil that means that types implementing the trait must be valid for the specified lifetime (in this case, the 'static
lifetime).
FYI, this syntax also allows you to specify any valid type bounds on the implementors of a trait. For example:
trait Food { }
trait Fruit: Food { }
struct Apple;
impl Food for Apple { }
// This compiles
impl Fruit for Apple { }
struct Pear;
// This won't compile, as `Pear` doesn't implement `Fruit`.
impl Fruit for Pear { }
(Playground link: https://play.rust-lang.org/?gist=bc9f7c94dbdaef0864f94dcc9b49a951&version=stable&mode=debug&edition=2015)
from tower.
Crystal answer, thanks very!
from tower.
Related Issues (20)
- Extending `Building a middleware from scratch` guide
- breaking change in tower design (0.6 or beyond): first class support for async fn traits HOT 20
- unexpected behaviour of `RateLimit`
- experiment with permit based service framework HOT 5
- Tower & Warp server error
- Rate Limit Layer not Respected HOT 1
- Feature Request: implement `layer` method on `ServiceExt` HOT 2
- Port tower to futures-lite HOT 6
- Integrate GATs into tower-service HOT 1
- Add `BoxCloneSyncService` HOT 2
- Build fails with -Zbuild-std HOT 2
- Improve documentation for tower-test
- [Feature Request]: Middleware for client side which implements balancing the RPS
- How to set tower middleware dynamically
- use workspace dependencies HOT 1
- Fix dead code warning when default features are turned off.
- error[E0015]: cannot call non-const fn `Identity::new` in constant functions HOT 5
- Changelog says that MSRV is 1.63 but it's 1.64
- tower 5.0 : error[E0015]: cannot call non-const fn `Identity::new` in constant functions HOT 1
- Update `sync_wrapper` version to `1.0`. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tower.