pub struct StreamInfo {
pub name: String,
pub subjects: Vec<String>,
pub messages: u64,
pub bytes: u64,
pub first_seq: u64,
pub last_seq: u64,
pub consumer_count: usize,
pub exists: bool,
}Expand description
Information about a JetStream stream
Fields§
§name: StringStream name
subjects: Vec<String>Subjects this stream listens to
messages: u64Number of messages in the stream
bytes: u64Total bytes in the stream
first_seq: u64First sequence number
last_seq: u64Last sequence number
consumer_count: usizeNumber of consumers attached to this stream
exists: boolWhether the stream exists
Implementations§
Source§impl StreamInfo
impl StreamInfo
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if the stream is healthy (exists and not at capacity)
Sourcepub fn utilization_percent(&self) -> f64
pub fn utilization_percent(&self) -> f64
Get utilization percentage (0-100)
Trait Implementations§
Source§impl Clone for StreamInfo
impl Clone for StreamInfo
Source§fn clone(&self) -> StreamInfo
fn clone(&self) -> StreamInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StreamInfo
impl RefUnwindSafe for StreamInfo
impl Send for StreamInfo
impl Sync for StreamInfo
impl Unpin for StreamInfo
impl UnsafeUnpin for StreamInfo
impl UnwindSafe for StreamInfo
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