pub trait GeneratedFileAuxData:
Debug
+ Sync
+ Send
+ Serialize
+ Deserialize {
// Required methods
fn as_any(&self) -> &dyn Any;
fn eq(&self, other: &dyn GeneratedFileAuxData) -> bool;
fn hash_value(&self) -> u64;
}Expand description
A trait for arbitrary data that a macro generates along with the generated file.
Required Methods§
fn as_any(&self) -> &dyn Any
fn eq(&self, other: &dyn GeneratedFileAuxData) -> bool
Sourcefn hash_value(&self) -> u64
fn hash_value(&self) -> u64
Returns a hash value for this aux data. This is used to make the containing structs hashable. Implementations should ensure that equal objects have equal hash values.
Trait Implementations§
Source§impl<'typetag> Serialize for dyn GeneratedFileAuxData + 'typetag
impl<'typetag> Serialize for dyn GeneratedFileAuxData + 'typetag
Source§impl<'typetag> Serialize for dyn GeneratedFileAuxData + Send + 'typetag
impl<'typetag> Serialize for dyn GeneratedFileAuxData + Send + 'typetag
Source§impl<'typetag> Serialize for dyn GeneratedFileAuxData + Sync + 'typetag
impl<'typetag> Serialize for dyn GeneratedFileAuxData + Sync + 'typetag
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".