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
)