pub struct RepositoryMetadata {
pub backend_type: Option<String>,
pub total_metrics: Option<usize>,
pub storage_size_bytes: Option<u64>,
pub config: HashMap<String, String>,
pub last_modified: Option<DateTime<Utc>>,
}Expand description
Metadata about a metrics repository.
Fields§
§backend_type: Option<String>The type of repository backend (e.g., “filesystem”, “s3”, “memory”).
total_metrics: Option<usize>Total number of stored metrics.
storage_size_bytes: Option<u64>Total storage size in bytes.
config: HashMap<String, String>Repository-specific configuration.
last_modified: Option<DateTime<Utc>>Last modification timestamp.
Implementations§
Source§impl RepositoryMetadata
impl RepositoryMetadata
Sourcepub fn new(backend_type: impl Into<String>) -> Self
pub fn new(backend_type: impl Into<String>) -> Self
Creates a new repository metadata instance.
Sourcepub fn with_total_metrics(self, count: usize) -> Self
pub fn with_total_metrics(self, count: usize) -> Self
Sets the total number of metrics.
Sourcepub fn with_storage_size(self, size: u64) -> Self
pub fn with_storage_size(self, size: u64) -> Self
Sets the storage size in bytes.
Trait Implementations§
Source§impl Clone for RepositoryMetadata
impl Clone for RepositoryMetadata
Source§fn clone(&self) -> RepositoryMetadata
fn clone(&self) -> RepositoryMetadata
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 moreSource§impl Debug for RepositoryMetadata
impl Debug for RepositoryMetadata
Source§impl Default for RepositoryMetadata
impl Default for RepositoryMetadata
Source§fn default() -> RepositoryMetadata
fn default() -> RepositoryMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RepositoryMetadata
impl<'de> Deserialize<'de> for RepositoryMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RepositoryMetadata
impl RefUnwindSafe for RepositoryMetadata
impl Send for RepositoryMetadata
impl Sync for RepositoryMetadata
impl Unpin for RepositoryMetadata
impl UnwindSafe for RepositoryMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more