mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
move to gen-server impl
This commit is contained in:
parent
3588d6b2da
commit
8f1ce82753
7 changed files with 181 additions and 575 deletions
|
@ -120,6 +120,16 @@ impl RawResponse {
|
|||
}
|
||||
|
||||
impl RawNotification {
|
||||
pub fn new<N>(params: N::Params) -> RawNotification
|
||||
where
|
||||
N: Notification,
|
||||
N::Params: Serialize,
|
||||
{
|
||||
RawNotification {
|
||||
method: N::METHOD.to_string(),
|
||||
params: to_value(¶ms).unwrap(),
|
||||
}
|
||||
}
|
||||
pub fn cast<N>(self) -> ::std::result::Result<N::Params, RawNotification>
|
||||
where
|
||||
N: Notification,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue