pub struct ApiDetails {Show 13 fields
    pub name: Option<String>,
    pub bucket: Option<String>,
    pub object: Option<String>,
    pub objects: Vec<ObjectVersion>,
    pub status: Option<String>,
    pub status_code: Option<i32>,
    pub input_bytes: i64,
    pub output_bytes: i64,
    pub header_bytes: Option<i64>,
    pub time_to_first_byte: Option<String>,
    pub time_to_first_byte_in_ns: Option<String>,
    pub time_to_response: Option<String>,
    pub time_to_response_in_ns: Option<String>,
}Expand description
API details structure ApiDetails is used to define the details of an API operation
The ApiDetails structure contains the following fields:
- name- the name of the API operation
- bucket- the bucket name
- object- the object name
- objects- the list of objects
- status- the status of the API operation
- status_code- the status code of the API operation
- input_bytes- the input bytes
- output_bytes- the output bytes
- header_bytes- the header bytes
- time_to_first_byte- the time to first byte
- time_to_first_byte_in_ns- the time to first byte in nanoseconds
- time_to_response- the time to response
- time_to_response_in_ns- the time to response in nanoseconds
The ApiDetails structure contains the following methods:
- new- create a new- ApiDetailswith default values
- set_name- set the name
- set_bucket- set the bucket
- set_object- set the object
- set_objects- set the objects
- set_status- set the status
- set_status_code- set the status code
- set_input_bytes- set the input bytes
- set_output_bytes- set the output bytes
- set_header_bytes- set the header bytes
- set_time_to_first_byte- set the time to first byte
- set_time_to_first_byte_in_ns- set the time to first byte in nanoseconds
- set_time_to_response- set the time to response
- set_time_to_response_in_ns- set the time to response in nanoseconds
§Example
use rustfs_obs::ApiDetails;
use rustfs_obs::ObjectVersion;
let api = ApiDetails::new()
    .set_name(Some("GET".to_string()))
    .set_bucket(Some("my-bucket".to_string()))
    .set_object(Some("my-object".to_string()))
    .set_objects(vec![ObjectVersion::new_with_object_name("my-object".to_string())])
    .set_status(Some("OK".to_string()))
    .set_status_code(Some(200))
    .set_input_bytes(100)
    .set_output_bytes(200)
    .set_header_bytes(Some(50))
    .set_time_to_first_byte(Some("100ms".to_string()))
    .set_time_to_first_byte_in_ns(Some("100000000ns".to_string()))
    .set_time_to_response(Some("200ms".to_string()))
    .set_time_to_response_in_ns(Some("200000000ns".to_string()));Fields§
§name: Option<String>§bucket: Option<String>§object: Option<String>§objects: Vec<ObjectVersion>§status: Option<String>§status_code: Option<i32>§input_bytes: i64§output_bytes: i64§header_bytes: Option<i64>§time_to_first_byte: Option<String>§time_to_first_byte_in_ns: Option<String>§time_to_response: Option<String>§time_to_response_in_ns: Option<String>Implementations§
Source§impl ApiDetails
 
impl ApiDetails
Sourcepub fn set_bucket(self, bucket: Option<String>) -> Self
 
pub fn set_bucket(self, bucket: Option<String>) -> Self
Set the bucket
Sourcepub fn set_object(self, object: Option<String>) -> Self
 
pub fn set_object(self, object: Option<String>) -> Self
Set the object
Sourcepub fn set_objects(self, objects: Vec<ObjectVersion>) -> Self
 
pub fn set_objects(self, objects: Vec<ObjectVersion>) -> Self
Set the objects
Sourcepub fn set_status(self, status: Option<String>) -> Self
 
pub fn set_status(self, status: Option<String>) -> Self
Set the status
Sourcepub fn set_status_code(self, status_code: Option<i32>) -> Self
 
pub fn set_status_code(self, status_code: Option<i32>) -> Self
Set the status code
Sourcepub fn set_input_bytes(self, input_bytes: i64) -> Self
 
pub fn set_input_bytes(self, input_bytes: i64) -> Self
Set the input bytes
Sourcepub fn set_output_bytes(self, output_bytes: i64) -> Self
 
pub fn set_output_bytes(self, output_bytes: i64) -> Self
Set the output bytes
Sourcepub fn set_header_bytes(self, header_bytes: Option<i64>) -> Self
 
pub fn set_header_bytes(self, header_bytes: Option<i64>) -> Self
Set the header bytes
Sourcepub fn set_time_to_first_byte(self, time_to_first_byte: Option<String>) -> Self
 
pub fn set_time_to_first_byte(self, time_to_first_byte: Option<String>) -> Self
Set the time to first byte
Sourcepub fn set_time_to_first_byte_in_ns(
    self,
    time_to_first_byte_in_ns: Option<String>,
) -> Self
 
pub fn set_time_to_first_byte_in_ns( self, time_to_first_byte_in_ns: Option<String>, ) -> Self
Set the time to first byte in nanoseconds
Sourcepub fn set_time_to_response(self, time_to_response: Option<String>) -> Self
 
pub fn set_time_to_response(self, time_to_response: Option<String>) -> Self
Set the time to response
Sourcepub fn set_time_to_response_in_ns(
    self,
    time_to_response_in_ns: Option<String>,
) -> Self
 
pub fn set_time_to_response_in_ns( self, time_to_response_in_ns: Option<String>, ) -> Self
Set the time to response in nanoseconds
Trait Implementations§
Source§impl Clone for ApiDetails
 
impl Clone for ApiDetails
Source§fn clone(&self) -> ApiDetails
 
fn clone(&self) -> ApiDetails
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 ApiDetails
 
impl Debug for ApiDetails
Source§impl Default for ApiDetails
 
impl Default for ApiDetails
Source§fn default() -> ApiDetails
 
fn default() -> ApiDetails
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApiDetails
 
impl<'de> Deserialize<'de> for ApiDetails
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
Source§impl PartialEq for ApiDetails
 
impl PartialEq for ApiDetails
Source§impl Serialize for ApiDetails
 
impl Serialize for ApiDetails
impl Eq for ApiDetails
impl StructuralPartialEq for ApiDetails
Auto Trait Implementations§
impl Freeze for ApiDetails
impl RefUnwindSafe for ApiDetails
impl Send for ApiDetails
impl Sync for ApiDetails
impl Unpin for ApiDetails
impl UnwindSafe for ApiDetails
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<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.Source§impl<T> FutureExt for T
 
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
 
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
 
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
 
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
 
fn into_request(self) -> Request<T>
Wrap the input message 
T in a tonic::Request