pub struct Metadata { /* private fields */ }Expand description
Ordered metadata container using Vec<(String, String)> for deterministic
ordering (required for FATE test parity). Case-insensitive key lookup.
Implementations§
Source§impl Metadata
impl Metadata
pub fn new() -> Self
Sourcepub fn set(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn set(&mut self, key: impl Into<String>, value: impl Into<String>)
Set a metadata key-value pair. If the key already exists (case-insensitive), the existing value is replaced. Otherwise, the pair is appended.
Sourcepub fn remove(&mut self, key: &str) -> Option<String>
pub fn remove(&mut self, key: &str) -> Option<String>
Remove a key (case-insensitive). Returns the removed value if found.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
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