Struct Cache Write Token Counts
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub struct CacheWriteTokenCounts {
pub count: Option<u64>,
pub duration: Option<u64>,
}
Prompt-cache write tokens retained for one cache duration.
Fields
count: Option<u64>
Tokens written for this duration; explicit zero is valid, but absence is not.
duration: Option<u64>
Cache duration in seconds, absent when the provider does not report it.
Implementations
impl CacheWriteTokenCounts
impl CacheWriteTokenCounts
count
pub fn count(&self) -> u64
Returns the value of count, or the default value if count is unset.
duration
pub fn duration(&self) -> u64
Returns the value of duration, or the default value if duration is unset.
Trait Implementations
impl Clone for CacheWriteTokenCounts
impl Clone for CacheWriteTokenCounts
clone
fn clone(&self) -> CacheWriteTokenCounts
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for CacheWriteTokenCounts
impl Debug for CacheWriteTokenCounts
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for CacheWriteTokenCounts
impl Default for CacheWriteTokenCounts
default
fn default() -> Self
impl Hash for CacheWriteTokenCounts
impl Hash for CacheWriteTokenCounts
hash
fn hash<__H: Hasher>(&self, state: &mut __H)
hash_slice
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Self: Sized,
impl Message for CacheWriteTokenCounts
impl Message for CacheWriteTokenCounts
encoded_len
fn encoded_len(&self) -> usize
clear
fn clear(&mut self)
encode
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
encode_to_vec
fn encode_to_vec(&self) -> Vec<u8> where
Self: Sized,
encode_length_delimited
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
encode_length_delimited_to_vec
fn encode_length_delimited_to_vec(&self) -> Vec<u8> where
Self: Sized,
decode
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
decode_length_delimited
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
merge
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
merge_length_delimited
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
impl Name for CacheWriteTokenCounts
impl Name for CacheWriteTokenCounts
NAME
const NAME: &'static str = "CacheWriteTokenCounts"
PACKAGE
const PACKAGE: &'static str = "nvidia.nemo.relay.worker.v1"
full_name
fn full_name() -> String
type_url
fn type_url() -> String
impl PartialEq for CacheWriteTokenCounts
impl PartialEq for CacheWriteTokenCounts
eq
fn eq(&self, other: &CacheWriteTokenCounts) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl WireValue<CacheWriteTokenCounts> for CacheWriteTokenCounts
impl WireValue<CacheWriteTokenCounts> for CacheWriteTokenCounts
to_wire
fn to_wire(self) -> Result<CacheWriteTokenCounts>
from_wire
fn from_wire(value: CacheWriteTokenCounts) -> Result<Self>
impl Copy for CacheWriteTokenCounts
impl Copy for CacheWriteTokenCounts
impl Eq for CacheWriteTokenCounts
impl Eq for CacheWriteTokenCounts
impl StructuralPartialEq for CacheWriteTokenCounts
impl StructuralPartialEq for CacheWriteTokenCounts