pub async fn async_extract_metadata_from_file(
file_path: &str,
) -> Result<(MetadataMap, Keywords, MetaTagGroups), MetadataError>Available on crate feature
tokio only.Expand description
Asynchronously extracts metadata from a file (feature tokio).
Kept for callers of earlier releases; new code should use
crate::tokio::extract_from_file, which accepts any path type.
§Errors
As crate::tokio::extract_from_file.
§Security
This function reads files from the file system. Ensure that the file_path
is properly sanitized and validated to prevent potential security issues like
path traversal attacks.
§Example
use metadata_gen::utils::async_extract_metadata_from_file;
let result = async_extract_metadata_from_file("content/post.md").await;