boluo-core 0.4.1
also affects
boluo 0.5.3
(dyn AnyService<Req, Error = Err, Response = Res> + 'static): AnyService<Req>
pub trait Service<Req>: Send + Sync {
type Response;
type Error;
// ...
}
trait AnyService<Req>: Send + Sync {
type Response;
type Error;
// ...
}
impl<S, Req> AnyService<Req> for S
where
S: Service<Req> + ?Sized,
{
type Response = S::Response;
type Error = S::Error;
// ...
}
daab 0.4.0
(dyn Builder<Rc<(dyn std::any::Any + 'static)>, Rc<(dyn std::any::Any + 'static)>, Artifact = test_dyn::ComplexNode, DynState = (), Err = never::Never> + 'static): rc::Builder
pub trait Builder: Debug + 'static {
type Artifact : Debug + 'static;
type DynState : Debug + 'static;
type Err : Debug + 'static;
// ...
}
pub trait SimpleBuilder: Debug + 'static {
type Artifact : Debug + 'static;
// ...
}
impl<B: ?Sized + SimpleBuilder> Builder for B {
type Artifact = B::Artifact;
type DynState = ();
type Err = Never;
}
flipflop 0.1.0
(dyn AccumObj<Item = <A as Accum>::Item> + 'a): AccumObj
pub trait AccumObj {
type Item;
}
impl<A: ?Sized + Accum> AccumObj for A {
type Item = A::Item;
}
pub trait Accum {
type Item;
// ...
}
thirtyfour 0.34.0
Also affects
gaboja 0.4.1
chromedriver-manager 0.3.5
dyn ElementQueryFn<T, Fut = Pin<Box<dyn Future<Output = Result<T, WebDriverError>> + Send>>>: types::ElementQueryFn<T>
pub trait ElementQueryFn<T>: Send + Sync {
type Fut: Future<Output = WebDriverResult<T>> + Send;
}
impl<T, Fut, Fun> ElementQueryFn<T> for Fun
where
Fun: Fn(WebElement) -> Fut + Send + Sync + ?Sized,
Fut: Future<Output = WebDriverResult<T>> + Send,
{
type Fut = Fut;
}
dyn ElementQueryFn<T>
does not implement Fn(WebElement)
transmutter
Oh look at me, I am so funny, publishing a crate for safe transmute
pub trait Transmutter<U> {
type Target;
}
impl<T: ?Sized, U> Transmutter<U> for T {
type Target = U;
}
fn transmutter<T: ?Sized, U>(source: <T as Transmutter<U>>::Target) -> U {
source
}
pub fn transmutte<T, U>(value: T) -> U {
transmutter::<dyn Transmutter<U, Target = T>, U>(value)
}
hooks-yew
/ hooks
oh no, a lifetime error on a call to erased_use_hook
for dyn for<'a> ErasedHook<(&'a Props,), ValueGat = dyn for<'hook> ValueGat<'hook, Value = VNode>>
the underlying pattern is as follows:
trait Trait<T> {
fn method(&self);
}
trait Erased<T> {
type Assoc;
fn erased(&self);
}
impl<T> Trait<T> for dyn Erased<T, Assoc = ()> {
fn method(&self) {
self.erased();
}
}
impl<T, H: Trait<T> + ?Sized> Erased<T> for H {
type Assoc = ();
fn erased(&self) {
self.method();
}
}
fn break_me(hr: Box<dyn for<'a> Erased<&'a (), Assoc = ()>>) {
// `hr` implements `for<'a> Erased<&'a ()>` via the builtin impl
//
// using the indirection via `dyn Erased<T>: Trait<T>` forces
// `'a` to not be higher-ranked.
hr.erased();
}
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing