pub struct GenerationCache { /* private fields */ }Expand description
Represents the cached state of a generation run
Implementations§
Source§impl GenerationCache
impl GenerationCache
Sourcepub fn new(
commands: &[CommandInfo],
structs: &HashMap<String, StructInfo>,
config: &GenerateConfig,
) -> Result<Self, CacheError>
pub fn new( commands: &[CommandInfo], structs: &HashMap<String, StructInfo>, config: &GenerateConfig, ) -> Result<Self, CacheError>
Create a new cache from current generation state
Sourcepub fn needs_regeneration<P: AsRef<Path>>(
output_dir: P,
commands: &[CommandInfo],
structs: &HashMap<String, StructInfo>,
config: &GenerateConfig,
) -> Result<bool, CacheError>
pub fn needs_regeneration<P: AsRef<Path>>( output_dir: P, commands: &[CommandInfo], structs: &HashMap<String, StructInfo>, config: &GenerateConfig, ) -> Result<bool, CacheError>
Check if generation is needed by comparing with previous cache
Trait Implementations§
Source§impl Debug for GenerationCache
impl Debug for GenerationCache
Source§impl<'de> Deserialize<'de> for GenerationCache
impl<'de> Deserialize<'de> for GenerationCache
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GenerationCache
impl RefUnwindSafe for GenerationCache
impl Send for GenerationCache
impl Sync for GenerationCache
impl Unpin for GenerationCache
impl UnwindSafe for GenerationCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more