fastxdr/impls/template/
bytes.rs1use super::{FromTemplate, ReferenceType};
2
3#[derive(Debug, Clone, Copy)]
4pub struct Bytes;
5
6impl FromTemplate for Bytes {
7 fn type_name(&self) -> &'static str {
8 "Bytes"
9 }
10
11 fn try_from(&self) -> &'static str {
12 "Bytes"
13 }
14
15 fn ref_type(&self) -> ReferenceType {
16 ReferenceType::ByRef
17 }
18}
19
20#[derive(Debug, Clone, Copy)]
21pub struct RefMutBytes;
22
23impl FromTemplate for RefMutBytes {
24 fn type_name(&self) -> &'static str {
25 "Bytes"
26 }
27
28 fn try_from(&self) -> &'static str {
29 "&mut Bytes"
30 }
31
32 fn ref_type(&self) -> ReferenceType {
33 ReferenceType::ByValue
34 }
35}