Debian Codegraph @

src/serde.rs

raw symbols SCIP
1 extern crate serderust-analyzer cargo sshkeys 0.3.4 serde/serde/;
2
3 use selfrust-analyzer cargo sshkeys 0.3.4 serde/::serderust-analyzer cargo serde 1.0.226 crate/::{derust-analyzer cargo serde_core 1.0.226 de/, Deserializerust-analyzer cargo serde_core 1.0.226 de/Deserialize#, Deserializerrust-analyzer cargo serde_core 1.0.226 de/Deserializer#, Serializerust-analyzer cargo serde_core 1.0.226 ser/Serialize#, Serializerrust-analyzer cargo serde_core 1.0.226 ser/Serializer#};
4 use superrust-analyzer cargo sshkeys 0.3.4 crate/::pubkeyrust-analyzer cargo sshkeys 0.3.4 pubkey/::PublicKeyrust-analyzer cargo sshkeys 0.3.4 pubkey/PublicKey#;
5 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/;
6
7 impl Serializerust-analyzer cargo serde_core 1.0.226 ser/Serialize# for PublicKeyrust-analyzer cargo sshkeys 0.3.4 pubkey/PublicKey# {
8 fn serializerust-analyzer cargo sshkeys 0.3.4 serde/impl#[PublicKey][Serialize]serialize().<S: Serializerrust-analyzer cargo serde_core 1.0.226 ser/Serializer#>(&self, serializer: S) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<S::Okrust-analyzer cargo serde_core 1.0.226 ser/Serializer#Ok#, S::Errorrust-analyzer cargo serde_core 1.0.226 ser/Serializer#Error#> {
9 serializer.serialize_strrust-analyzer cargo serde_core 1.0.226 ser/Serializer#serialize_str().(&self.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())
10 }
11 }
12
13 impl<'de> Deserializerust-analyzer cargo serde_core 1.0.226 de/Deserialize#<'de> for PublicKeyrust-analyzer cargo sshkeys 0.3.4 pubkey/PublicKey# {
14 fn deserializerust-analyzer cargo sshkeys 0.3.4 serde/impl#[PublicKey][`Deserialize<'de>`]deserialize().<D: Deserializerrust-analyzer cargo serde_core 1.0.226 de/Deserializer#<'de>>(deserializer: D) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sshkeys 0.3.4 serde/impl#[PublicKey][`Deserialize<'de>`], D::Errorrust-analyzer cargo serde_core 1.0.226 de/Deserializer#Error#> {
15 struct Visitorrust-analyzer cargo sshkeys 0.3.4 serde/Visitor#;
16
17 impl<'de> derust-analyzer cargo serde_core 1.0.226 de/::Visitorrust-analyzer cargo serde_core 1.0.226 de/Visitor#<'de> for Visitorrust-analyzer cargo sshkeys 0.3.4 serde/Visitor# {
18 type Valuerust-analyzer cargo sshkeys 0.3.4 serde/impl#[Visitor][`Visitor<'de>`]Value# = PublicKeyrust-analyzer cargo sshkeys 0.3.4 pubkey/PublicKey#;
19
20 fn expectingrust-analyzer cargo sshkeys 0.3.4 serde/impl#[Visitor][`Visitor<'de>`]expecting().(&self, formatter: &mut fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
21 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(formatter, "a valid public key")
22 }
23
24 fn visit_strrust-analyzer cargo sshkeys 0.3.4 serde/impl#[Visitor][`Visitor<'de>`]visit_str().<E: derust-analyzer cargo serde_core 1.0.226 de/::Errorrust-analyzer cargo serde_core 1.0.226 de/Error#>(self, value: &str) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PublicKeyrust-analyzer cargo sshkeys 0.3.4 pubkey/PublicKey#, E> {
25 PublicKeyrust-analyzer cargo sshkeys 0.3.4 pubkey/PublicKey#::from_stringrust-analyzer cargo sshkeys 0.3.4 pubkey/impl#[PublicKey]from_string().(value).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| E::customrust-analyzer cargo serde_core 1.0.226 de/Error#custom().(e.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()))
26 }
27 }
28
29 deserializer.deserialize_strrust-analyzer cargo serde_core 1.0.226 de/Deserializer#deserialize_str().(Visitorrust-analyzer cargo sshkeys 0.3.4 serde/Visitor#)
30 }
31 }