pub fn layer(&self, path: &[LayerId]) -> Result<&Layer, DocumentError> {
		if path.is_empty() {
			return Ok(&self.root);
		}
		let (path, id) = split_path(path)?;
		self.folder(&path)?.layer(id).ok_or_else(|| DocumentError::LayerNotFound(path.into()))
	}
/// Returns a reference to the layer or folder at the path.
Returns a reference to the layer or folder at the path.
Returns a reference to the layer or folder at the path .
pub fn layer(&self, path: &[LayerId]) -> Result<&Layer, DocumentError> {
		if path.is_empty() {
			return Ok(&self.root);
		}
		let (path, id) = split_path(path)?;
		self.folder(&path)?.layer(id).ok_or_else(|| DocumentError::LayerNotFound(path.into()))
	}
pub fn layer ( & self , path : & [ LayerId ] ) -> Result < & Layer , DocumentError > { if path . is_empty ( ) { return Ok ( & self . root ) ; } let ( path , id ) = split_path ( path ) ? ; self . folder ( & path ) ? . layer ( id ) . ok_or_else ( | | DocumentError :: LayerNotFound ( path . into ( ) ) ) }
Returns a reference to the layer or folder at the path.
Returns a reference to the layer or folder at the path .
&self
path
&[LayerId]
&self
path
&[LayerId]