pub struct IrParams { /* private fields */ }Expand description
The parameters of a request or notification.
Opaque by design — see the module docs. An empty bag means “no parameters the IR models”, which is the common case and not the same as “no parameters”.
Implementations§
Source§impl IrParams
impl IrParams
Sourcepub const fn from_extensions(entries: Extensions) -> Self
pub const fn from_extensions(entries: Extensions) -> Self
Wraps an extension bag as parameters.
Sourcepub fn with(self, name: impl Into<String>, value: ExtensionValue) -> Self
pub fn with(self, name: impl Into<String>, value: ExtensionValue) -> Self
Adds a parameter.
Sourcepub fn get(&self, name: &str) -> Option<&ExtensionValue>
pub fn get(&self, name: &str) -> Option<&ExtensionValue>
A parameter, if present.
Sourcepub const fn as_extensions(&self) -> &Extensions
pub const fn as_extensions(&self) -> &Extensions
The underlying bag.
Trait Implementations§
impl StructuralPartialEq for IrParams
Auto Trait Implementations§
impl Freeze for IrParams
impl RefUnwindSafe for IrParams
impl Send for IrParams
impl Sync for IrParams
impl Unpin for IrParams
impl UnsafeUnpin for IrParams
impl UnwindSafe for IrParams
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