pub struct PlaceholderRpc {
pub method: String,
pub params: Value,
pub rpc_type: RpcType,
}
Expand description
A placeholder type which can represent a generic RPC.
This is the type used for custom plugin commands, which may have arbitrary method names and parameters.
Fields§
§method: String
§params: Value
§rpc_type: RpcType
Implementations§
Source§impl PlaceholderRpc
impl PlaceholderRpc
pub fn new<S, V>(method: S, params: V, request: bool) -> Self
pub fn is_request(&self) -> bool
Sourcepub fn params_ref(&self) -> &Value
pub fn params_ref(&self) -> &Value
Returns a reference to the placeholder’s params.
Sourcepub fn params_ref_mut(&mut self) -> &mut Value
pub fn params_ref_mut(&mut self) -> &mut Value
Returns a mutable reference to the placeholder’s params.
Sourcepub fn method_ref(&self) -> &str
pub fn method_ref(&self) -> &str
Returns a reference to the placeholder’s method.
Trait Implementations§
Source§impl Clone for PlaceholderRpc
impl Clone for PlaceholderRpc
Source§fn clone(&self) -> PlaceholderRpc
fn clone(&self) -> PlaceholderRpc
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PlaceholderRpc
impl Debug for PlaceholderRpc
Source§impl<'de> Deserialize<'de> for PlaceholderRpc
impl<'de> Deserialize<'de> for PlaceholderRpc
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PlaceholderRpc
impl PartialEq for PlaceholderRpc
Source§impl Serialize for PlaceholderRpc
impl Serialize for PlaceholderRpc
impl StructuralPartialEq for PlaceholderRpc
Auto Trait Implementations§
impl Freeze for PlaceholderRpc
impl RefUnwindSafe for PlaceholderRpc
impl Send for PlaceholderRpc
impl Sync for PlaceholderRpc
impl Unpin for PlaceholderRpc
impl UnwindSafe for PlaceholderRpc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more