pub fn as_image_mut(&mut self) -> Result<&mut ImageLayer, DocumentError> {
		match &mut self.data {
			LayerDataType::Image(img) => Ok(img),
			_ => Err(DocumentError::NotAnImage),
		}
	}
/// Get a mutable reference to the Image element wrapped by the layer.
/// This operation will fail if the [Layer type](Layer::data) is not `LayerDataType::Image`.
Get a mutable reference to the Image element wrapped by the layer.
This operation will fail if the [Layer type](Layer::data) is not `LayerDataType::Image`.
Get a mutable reference to the Image element wrapped by the layer . This operation will fail if the [ Layer type ] ( Layer :: data ) is not ` LayerDataType :: Image ` .
pub fn as_image_mut(&mut self) -> Result<&mut ImageLayer, DocumentError> {
		match &mut self.data {
			LayerDataType::Image(img) => Ok(img),
			_ => Err(DocumentError::NotAnImage),
		}
	}
pub fn as_image_mut ( & mut self ) -> Result < & mut ImageLayer , DocumentError > { match & mut self . data { LayerDataType :: Image ( img ) => Ok ( img ) , _ => Err ( DocumentError :: NotAnImage ) , } }
Get a mutable reference to the Image element wrapped by the layer.
Get a mutable reference to the Image element wrapped by the layer .
&mut self
&mut self