pub enum BatchEntry<'a> {
Call(Request<'a>),
Notification(Notification<'a>),
}
Expand description
A batch entry specific for the RpcServiceT::batch
method to support both
method calls and notifications.
Variants§
Implementations§
Source§impl<'a> BatchEntry<'a>
impl<'a> BatchEntry<'a>
Sourcepub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Get a reference to extensions of the batch entry.
Sourcepub fn extensions_mut(&mut self) -> &mut Extensions
pub fn extensions_mut(&mut self) -> &mut Extensions
Get a mut reference to extensions of the batch entry.
Sourcepub fn method_name(&self) -> &str
pub fn method_name(&self) -> &str
Get the method name of the batch entry.
Sourcepub fn set_method_name(&mut self, name: impl Into<Cow<'a, str>>)
pub fn set_method_name(&mut self, name: impl Into<Cow<'a, str>>)
Set the method name of the batch entry.
Sourcepub fn params(&self) -> Option<&Cow<'a, RawValue>>
pub fn params(&self) -> Option<&Cow<'a, RawValue>>
Get the params of the batch entry (may be empty).
Sourcepub fn set_params(&mut self, params: Option<Box<RawValue>>)
pub fn set_params(&mut self, params: Option<Box<RawValue>>)
Set the params of the batch entry.
Sourcepub fn into_extensions(self) -> Extensions
pub fn into_extensions(self) -> Extensions
Consume the batch entry and extract the extensions.
Trait Implementations§
Source§impl<'a> Clone for BatchEntry<'a>
impl<'a> Clone for BatchEntry<'a>
Source§fn clone(&self) -> BatchEntry<'a>
fn clone(&self) -> BatchEntry<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for BatchEntry<'a>
impl<'a> Debug for BatchEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for BatchEntry<'a>
impl<'a> !RefUnwindSafe for BatchEntry<'a>
impl<'a> Send for BatchEntry<'a>
impl<'a> Sync for BatchEntry<'a>
impl<'a> Unpin for BatchEntry<'a>
impl<'a> !UnwindSafe for BatchEntry<'a>
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