qubit_codec/value/
value_codec_registration_source.rs1#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
11pub struct ValueCodecRegistrationSource {
12 crate_name: &'static str,
13 module_path: &'static str,
14 file: &'static str,
15 line: u32,
16}
17
18impl ValueCodecRegistrationSource {
19 #[doc(hidden)]
21 #[must_use]
22 pub const fn new(crate_name: &'static str, module_path: &'static str, file: &'static str, line: u32) -> Self {
23 Self {
24 crate_name,
25 module_path,
26 file,
27 line,
28 }
29 }
30
31 #[must_use]
33 pub const fn crate_name(&self) -> &'static str {
34 self.crate_name
35 }
36
37 #[must_use]
39 pub const fn module_path(&self) -> &'static str {
40 self.module_path
41 }
42
43 #[must_use]
45 pub const fn file(&self) -> &'static str {
46 self.file
47 }
48
49 #[must_use]
51 pub const fn line(&self) -> u32 {
52 self.line
53 }
54}