[−][src]Struct atomic_lib::store::Store
The in-memory store of data, containing the Resources, Properties and Classes
Implementations
impl Store[src]
pub fn init() -> AtomicResult<Store>[src]
Creates an empty Store.
Run .populate() to get useful standard models loaded into your store.
pub fn read_store_from_file(&self, path: &PathBuf) -> AtomicResult<()>[src]
Reads an .ad3 (Atomic Data Triples) graph and adds it to the store
pub fn write_store_to_disk(&self, path: &PathBuf) -> AtomicResult<()>[src]
Serializes the current store and saves to path
Trait Implementations
impl Clone for Store[src]
impl Storelike for Store[src]
pub fn add_atoms(&self, atoms: Vec<Atom>) -> AtomicResult<()>[src]
pub fn add_resource(&self, resource: &Resource) -> AtomicResult<()>[src]
Adds a Resource to the store.
Replaces existing resource with the contents.
In most cases, you should use .commit() instead.
pub fn add_resource_unsafe(&self, resource: &Resource) -> AtomicResult<()>[src]
pub fn all_resources(&self) -> ResourceCollection[src]
pub fn get_base_url(&self) -> String[src]
pub fn get_default_agent(&self) -> AtomicResult<Agent>[src]
pub fn get_resource(&self, subject: &str) -> AtomicResult<Resource>[src]
pub fn remove_resource(&self, subject: &str)[src]
pub fn set_default_agent(&self, agent: Agent)[src]
pub fn get_self_url(&self) -> Option<String>[src]
pub fn commit(&self, commit: Commit) -> AtomicResult<Resource> where
Self: Sized, [src]
Self: Sized,
pub fn create_agent(&self, name: &str) -> AtomicResult<Agent>[src]
pub fn fetch_resource(&self, subject: &str) -> AtomicResult<Resource>[src]
pub fn get_class(&self, subject: &str) -> AtomicResult<Class>[src]
pub fn get_classes_for_subject(&self, subject: &str) -> AtomicResult<Vec<Class>>[src]
pub fn get_property(&self, subject: &str) -> AtomicResult<Property>[src]
pub fn get_resource_extended(&self, subject: &str) -> AtomicResult<Resource>[src]
pub fn handle_not_found(
&self,
subject: &str,
error: Box<dyn Error>
) -> AtomicResult<Resource>[src]
&self,
subject: &str,
error: Box<dyn Error>
) -> AtomicResult<Resource>
pub fn tpf(
&self,
q_subject: Option<&str>,
q_property: Option<&str>,
q_value: Option<&str>
) -> AtomicResult<Vec<Atom>>[src]
&self,
q_subject: Option<&str>,
q_property: Option<&str>,
q_value: Option<&str>
) -> AtomicResult<Vec<Atom>>
pub fn get_path(
&self,
atomic_path: &str,
mapping: Option<&Mapping>
) -> AtomicResult<PathReturn>[src]
&self,
atomic_path: &str,
mapping: Option<&Mapping>
) -> AtomicResult<PathReturn>
pub fn populate(&self) -> AtomicResult<()>[src]
pub fn validate(&self) -> ValidationReport[src]
Auto Trait Implementations
impl RefUnwindSafe for Store[src]
impl Send for Store[src]
impl Sync for Store[src]
impl Unpin for Store[src]
impl UnwindSafe for Store[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,