pub struct RequestMeta {
pub method: Cow<'static, str>,
pub id: Id,
/* private fields */
}
Expand description
RequestMeta
contains the Id
and method name of a request.
Fields§
§method: Cow<'static, str>
The method name.
id: Id
The request ID.
Implementations§
source§impl RequestMeta
impl RequestMeta
sourcepub fn is_subscription(&self) -> bool
pub fn is_subscription(&self) -> bool
Returns true
if the request is a subscription.
sourcepub fn set_is_subscription(&mut self)
pub fn set_is_subscription(&mut self)
Indicates that the request is a non-standard subscription (i.e. not “eth_subscribe”).
sourcepub fn set_subscription_status(&mut self, sub: bool)
pub fn set_subscription_status(&mut self, sub: bool)
Setter for is_subscription
. Indicates to RPC clients that the request
triggers a stream of notifications.
Trait Implementations§
source§impl Clone for RequestMeta
impl Clone for RequestMeta
source§fn clone(&self) -> RequestMeta
fn clone(&self) -> RequestMeta
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 RequestMeta
impl Debug for RequestMeta
source§impl PartialEq for RequestMeta
impl PartialEq for RequestMeta
impl Eq for RequestMeta
impl StructuralPartialEq for RequestMeta
Auto Trait Implementations§
impl Freeze for RequestMeta
impl RefUnwindSafe for RequestMeta
impl Send for RequestMeta
impl Sync for RequestMeta
impl Unpin for RequestMeta
impl UnwindSafe for RequestMeta
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)