pub struct InfoContext {
pub ctx: *mut RedisModuleInfoCtx,
}
Fields§
§ctx: *mut RedisModuleInfoCtx
Implementations§
Source§impl InfoContext
impl InfoContext
pub const fn new(ctx: *mut RedisModuleInfoCtx) -> Self
Sourcepub fn builder(&self) -> InfoContextBuilder<'_>
pub fn builder(&self) -> InfoContextBuilder<'_>
Returns a builder for the InfoContext
.
Sourcepub fn build_one_section<T: Into<OneInfoSectionData>>(
&self,
data: T,
) -> RedisResult<()>
pub fn build_one_section<T: Into<OneInfoSectionData>>( &self, data: T, ) -> RedisResult<()>
Returns a build result for the passed OneInfoSectionData
.
Sourcepub fn add_info_section(&self, name: Option<&str>) -> Status
👎Deprecated: Please use [InfoContext::builder
] instead.
pub fn add_info_section(&self, name: Option<&str>) -> Status
InfoContext::builder
] instead.The name
of the sction will be prefixed with the module name
and an underscore: <module name>_<name>
.
Sourcepub fn add_info_field_str(&self, name: &str, content: &str) -> Status
👎Deprecated: Please use [InfoContext::builder
] instead.
pub fn add_info_field_str(&self, name: &str, content: &str) -> Status
InfoContext::builder
] instead.The name
will be prefixed with the module name and an
underscore: <module name>_<name>
. The content
pass is left
“as is”.
Sourcepub fn add_info_field_long_long(&self, name: &str, value: c_longlong) -> Status
👎Deprecated: Please use [InfoContext::builder
] instead.
pub fn add_info_field_long_long(&self, name: &str, value: c_longlong) -> Status
InfoContext::builder
] instead.The name
will be prefixed with the module name and an
underscore: <module name>_<name>
. The value
pass is left
“as is”.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InfoContext
impl RefUnwindSafe for InfoContext
impl !Send for InfoContext
impl !Sync for InfoContext
impl Unpin for InfoContext
impl UnwindSafe for InfoContext
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