cyfs_base/objects/
empty.rs1use crate::*;
2use serde::Serialize;
3
4pub type EmptyType = NamedObjType<EmptyDescContent, EmptyBodyContent>;
9pub type Empty = NamedObjectBase<EmptyType>;
10
11#[derive(RawEncode, RawDecode, Clone)]
12pub struct EmptyDescContent {}
13
14impl DescContent for EmptyDescContent {
15 fn obj_type() -> u16 {
16 0u16
17 }
18 type OwnerType = SubDescNone;
19 type AreaType = SubDescNone;
20 type AuthorType = SubDescNone;
21 type PublicKeyType = SubDescNone;
22}
23
24#[derive(Clone, Default, cyfs_base_derive::RawEncode, cyfs_base_derive::RawDecode, Serialize)]
49pub struct EmptyBodyContent;
50
51impl BodyContent for EmptyBodyContent {}
52
53#[derive(Clone, Default, Serialize)]
54pub struct EmptyProtobufBodyContent;
55
56impl BodyContent for EmptyProtobufBodyContent {
57 fn format(&self) -> u8 {
58 OBJECT_CONTENT_CODEC_FORMAT_PROTOBUF
59 }
60}
61
62crate::inner_impl_empty_protobuf_raw_codec!(EmptyProtobufBodyContent);