pub trait ContextImpl<'g> {
type IterArgs;
type IterItem;
type Existing;
// Required methods
fn dir_name(fixture: &'g JsonFixture) -> Utf8PathBuf;
fn file_name(fixture: &'g JsonFixture, item: &Self::IterItem) -> String;
fn iter(
fixture: &'g JsonFixture,
args: &Self::IterArgs,
) -> Box<dyn Iterator<Item = Self::IterItem> + 'g>;
fn parse_existing(
path: &Utf8Path,
contents: String,
) -> Result<Self::Existing>;
fn is_changed(item: &Self::IterItem, existing: &Self::Existing) -> bool;
fn diff(
fixture: &'g JsonFixture,
item: &Self::IterItem,
existing: Option<&Self::Existing>,
) -> String;
fn write_to_string(
fixture: &'g JsonFixture,
item: &Self::IterItem,
out: &mut String,
) -> Result<()>;
}
Required Associated Types§
Required Methods§
fn dir_name(fixture: &'g JsonFixture) -> Utf8PathBuf
fn file_name(fixture: &'g JsonFixture, item: &Self::IterItem) -> String
fn iter( fixture: &'g JsonFixture, args: &Self::IterArgs, ) -> Box<dyn Iterator<Item = Self::IterItem> + 'g>
fn parse_existing(path: &Utf8Path, contents: String) -> Result<Self::Existing>
fn is_changed(item: &Self::IterItem, existing: &Self::Existing) -> bool
fn diff( fixture: &'g JsonFixture, item: &Self::IterItem, existing: Option<&Self::Existing>, ) -> String
fn write_to_string( fixture: &'g JsonFixture, item: &Self::IterItem, out: &mut String, ) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.