macro_rules! __hyper_generate_header_serialization {
($id:ident) => {
#[cfg(feature = "serde-serialization")]
impl ::serde::Serialize for $id {
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
where S: ::serde::Serializer {
format!("{}", self).serialize(serializer)
}
}
#[cfg(feature = "serde-serialization")]
impl ::serde::Deserialize for $id {
fn deserialize<D>(deserializer: &mut D) -> Result<$id, D::Error>
where D: ::serde::Deserializer {
let string_representation: String =
try!(::serde::Deserialize::deserialize(deserializer));
Ok($crate::header::Header::parse_header(&[
string_representation.into_bytes()
]).unwrap())
}
}
}
}
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).
Search functions by type signature (e.g.
vec -> usize
)