pub struct HashOpts {
pub ignore_field_names: Vec<&'static str>,
}Expand description
Tunables for hash_canonical_with.
Fields§
§ignore_field_names: Vec<&'static str>Field NAMES to drop from any object at any depth. Match is exact
on the key string. Examples: "cache_control", "id".
Implementations§
Source§impl HashOpts
impl HashOpts
Sourcepub fn ignore(self, field: &'static str) -> Self
pub fn ignore(self, field: &'static str) -> Self
Add a field name to the ignore list (chainable).
Sourcepub fn anthropic() -> Self
pub fn anthropic() -> Self
Pre-configured for Anthropic Messages API. Drops:
cache_control(set by callers for prompt caching; doesn’t change semantics)id(assistant message IDs differ per call)usage(token counts from the response side)stop_reason/stop_sequence(response-side)
Sourcepub fn openai() -> Self
pub fn openai() -> Self
Pre-configured for OpenAI Chat Completions. Drops:
created,id,object,system_fingerprint(response-side metadata)usagefinish_reason
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HashOpts
impl RefUnwindSafe for HashOpts
impl Send for HashOpts
impl Sync for HashOpts
impl Unpin for HashOpts
impl UnsafeUnpin for HashOpts
impl UnwindSafe for HashOpts
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