pub struct ServerInfo { /* private fields */ }Implementations§
Source§impl ServerInfo
impl ServerInfo
Sourcepub fn new(section: &str) -> Self
pub fn new(section: &str) -> Self
Creates a new ServerInfo without requiring a context.
The underlying Module API permits a NULL context for both
GetServerInfo and FreeServerInfo.
Sourcepub fn field(&self, field: &str) -> Option<ValkeyString>
pub fn field(&self, field: &str) -> Option<ValkeyString>
Returns a field value as a ValkeyString.
This works both with and without a context. When no context is
available, the returned ValkeyString will not be registered with the
auto memory mechanism, but Rust’s Drop ensures proper cleanup.
Sourcepub fn field_c(&self, field: &str) -> Option<&str>
pub fn field_c(&self, field: &str) -> Option<&str>
Returns a field value as a &str. Does not require a context.
The returned string borrows from the ServerInfo data and is valid
for the lifetime of this ServerInfo.
Sourcepub fn field_signed(&self, field: &str) -> Option<i64>
pub fn field_signed(&self, field: &str) -> Option<i64>
Returns a field value as a signed integer. Does not require a context.
Sourcepub fn field_unsigned(&self, field: &str) -> Option<u64>
pub fn field_unsigned(&self, field: &str) -> Option<u64>
Returns a field value as an unsigned integer. Does not require a context.
Sourcepub fn field_double(&self, field: &str) -> Option<f64>
pub fn field_double(&self, field: &str) -> Option<f64>
Returns a field value as a double. Does not require a context.
Trait Implementations§
Source§impl Drop for ServerInfo
impl Drop for ServerInfo
Auto Trait Implementations§
impl !Send for ServerInfo
impl !Sync for ServerInfo
impl Freeze for ServerInfo
impl RefUnwindSafe for ServerInfo
impl Unpin for ServerInfo
impl UnsafeUnpin for ServerInfo
impl UnwindSafe for ServerInfo
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