MCPcopy Create free account
hub / github.com/csskit/csskit / id

Method id

crates/csskit_lsp/src/jsonrpc/message.rs:50–57  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

48 }
49
50 pub fn id(&self) -> Option<Id> {
51 match self {
52 Message::Request(Request { id, .. }) => Some(id.clone()),
53 Message::Notification(_) => None,
54 Message::Response(Response::Ok(id, _)) => Some(id.clone()),
55 Message::Response(Response::Err(id, _, _, _)) => Some(id.clone()),
56 }
57 }
58
59 pub fn from_value<T: DeserializeOwned>(&self) -> Result<T, Error> {
60 match self {

Callers 1

handleMethod · 0.80

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected