Skip to main content

spawn_document

Function spawn_document 

Source
pub fn spawn_document(
    url: Url,
    content: String,
    language: Option<String>,
    sender: &UnboundedSender<CommandQueue>,
    extra: impl FnOnce(Entity, &mut World) + Send + Sync + 'static,
)
Expand description

Load a background document with content at url and parse it.

language is the language id. Pass None to let the file extension of url decide: a document matches every language whose id or extension matches, so forcing turtle on a .jsonld URL would give it both.