srdf::srdf_parser

Trait FocusRDF

Source
pub trait FocusRDF: SRDF {
    // Required methods
    fn set_focus(&mut self, focus: &Self::Term);
    fn get_focus(&self) -> &Option<Self::Term>;

    // Provided methods
    fn get_focus_as_term(&self) -> Result<&Self::Term, RDFParseError> { ... }
    fn get_focus_as_subject(&self) -> Result<Self::Subject, RDFParseError> { ... }
}
Expand description

Represents RDF graphs that contain a focus node

The trait contains methods to get the focus node and to set its value

Required Methods§

Source

fn set_focus(&mut self, focus: &Self::Term)

Set the value of the focus node

Source

fn get_focus(&self) -> &Option<Self::Term>

Get the focus node if it exists

Provided Methods§

Source

fn get_focus_as_term(&self) -> Result<&Self::Term, RDFParseError>

Get the current focus as a Term

Source

fn get_focus_as_subject(&self) -> Result<Self::Subject, RDFParseError>

Get the current focus as a Subject

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§