This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Gets the missing content of the record. | |
pub fn missing_content(&self) -> impl Iterator<Item = (&AnyHash, &MissingContent)> { | |
match &self.state { | |
PackageRecordState::Sourcing { | |
missing_content, .. | |
} => Box::new(missing_content.iter()) as Box<dyn Iterator<Item = _>>, | |
_ => Box::new(std::iter::empty()) as Box<dyn Iterator<Item = _>>, | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example generated bindings | |
mod bindings { | |
pub trait Host { | |
fn host_func(&mut self); | |
} | |
pub trait GetHost<T>: Send + Sync + 'static { | |
fn get_host<'a>(&self, data: &'a mut T) -> impl Host; | |
} |
OlderNewer