pub fn load<P: AsRef<Path>>(path: P) -> Result<ImageConfiguration> {
        let path = path.as_ref();
        let file = fs::File::open(path)?;
        let image = serde_json::from_reader(file)?;
        Ok(image)
    }
/// Attempts to load an image configuration.
/// # Errors
/// This function will return an [OciSpecError::Io](crate::OciSpecError::Io)
/// if the image configuration does not exist or an
/// [OciSpecError::SerDe](crate::OciSpecError::SerDe) if it is invalid.
/// # Example
/// ``` no_run
/// use oci_spec::image::ImageConfiguration;
///
/// let image_config = ImageConfiguration::load("my-config.json").unwrap();
/// ```
Attempts to load an image configuration.
Attempts to load an image configuration .
pub fn load<P: AsRef<Path>>(path: P) -> Result<ImageConfiguration> {
        let path = path.as_ref();
        let file = fs::File::open(path)?;
        let image = serde_json::from_reader(file)?;
        Ok(image)
    }
pub fn load < P : AsRef < Path > > ( path : P ) -> Result < ImageConfiguration > { let path = path . as_ref ( ) ; let file = fs :: File :: open ( path ) ? ; let image = serde_json :: from_reader ( file ) ? ; Ok ( image ) }
Attempts to load an image configuration.
Attempts to load an image configuration .
path
P
path
P
errors
This function will return an [OciSpecError::Io](crate::OciSpecError::Io)
if the image configuration does not exist or an
[OciSpecError::SerDe](crate::OciSpecError::SerDe) if it is invalid.
This function will return an [ OciSpecError :: Io ] ( crate :: OciSpecError :: Io ) if the image configuration does not exist or an [ OciSpecError :: SerDe ] ( crate :: OciSpecError :: SerDe ) if it is invalid .
example
``` no_run
use oci_spec::image::ImageConfiguration.

let image_config = ImageConfiguration::load("my-config.json").unwrap();
```
` ` ` no_run use oci_spec :: image :: ImageConfiguration . let image_config = ImageConfiguration :: load ( " my - config . json " ) . unwrap () ; ` ` `