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