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 const fn set_is_subscription(&mut self)
pub const fn set_is_subscription(&mut self)
Indicates that the request is a non-standard subscription (i.e. not “eth_subscribe”).
Sourcepub const fn set_subscription_status(&mut self, sub: bool)
pub const fn set_subscription_status(&mut self, sub: bool)
Setter for is_subscription
. Indicates to RPC clients that the request
triggers a stream of notifications.
Sourcepub const fn extensions(&self) -> &Extensions
pub const fn extensions(&self) -> &Extensions
Returns a reference to the request extensions.
These can be used to attach additional metadata to the request that can be used by middleware or other components.
Sourcepub const fn extensions_mut(&mut self) -> &mut Extensions
pub const fn extensions_mut(&mut self) -> &mut Extensions
Returns a mutable reference to the request extensions.
These can be used to attach additional metadata to the request that can be used by middleware or other components.
Trait Implementations§
Source§impl Clone for RequestMeta
impl Clone for RequestMeta
Source§fn clone(&self) -> RequestMeta
fn clone(&self) -> RequestMeta
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RequestMeta
impl Debug for RequestMeta
Source§impl PartialEq for RequestMeta
impl PartialEq for RequestMeta
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes