pub trait HeaderFieldSource: FieldSourceSealed {
// Required methods
fn visit_fields_while<'a>(
&'a self,
visitor: &mut dyn FnMut(&'a str, &'a str) -> bool,
);
fn to_header_map(&self) -> HeaderMap;
}Expand description
A validated, borrowed view of remoting command extension fields.
This trait is sealed because source implementations must guarantee that
every visited key and value is valid immutable UTF-8 for the full source
borrow. Returning false from the visitor stops the scan early.
Required Methods§
Sourcefn visit_fields_while<'a>(
&'a self,
visitor: &mut dyn FnMut(&'a str, &'a str) -> bool,
)
fn visit_fields_while<'a>( &'a self, visitor: &mut dyn FnMut(&'a str, &'a str) -> bool, )
Visits fields without allocating owned key/value strings.
Sourcefn to_header_map(&self) -> HeaderMap
fn to_header_map(&self) -> HeaderMap
Produces the owned compatibility representation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".