oca_rs::facade

Struct Facade

Source
pub struct Facade { /* private fields */ }

Implementations§

Source§

impl Facade

Source

pub fn validate_ocafile( &self, ocafile: String, ) -> Result<OCABuild, Vec<ValidationError>>

Source

pub fn build(&mut self, oca_build: &OCABuild) -> Result<OCABundle, Vec<Error>>

Source

pub fn build_from_ocafile( &mut self, ocafile: String, ) -> Result<OCABundle, Vec<Error>>

Source§

impl Facade

Source

pub fn explore(&self, said: String) -> Option<Relationship>

Source

pub fn add_relations(&mut self, oca_bundle: OCABundle) -> Result<(), String>

Source§

impl Facade

Source

pub fn search_oca_bundle( &self, language: Option<Language>, query: String, limit: usize, page: usize, ) -> SearchResult

Source

pub fn fetch_all_oca_bundle( &self, limit: usize, page: usize, ) -> Result<AllOCABundleResult, Vec<String>>

Source

pub fn fetch_all_capture_base( &self, limit: usize, page: usize, ) -> Result<AllCaptureBaseResult, Vec<String>>

Source

pub fn get_oca_objects( &self, saids: Vec<String>, ) -> Result<Vec<OCAObject>, Vec<String>>

Source

pub fn get_oca_bundle( &self, said: SelfAddressingIdentifier, with_dep: bool, ) -> Result<BundleWithDependencies, Vec<String>>

Source

pub fn get_oca_bundle_steps( &self, said: SelfAddressingIdentifier, ) -> Result<Vec<OCABuildStep>, Vec<String>>

Source

pub fn get_oca_bundle_ocafile( &self, said: SelfAddressingIdentifier, dereference: bool, ) -> Result<String, Vec<String>>

Retrive the ocafile for a given said If dereference is true, all local references will be dereferenced to SAID

Source

pub fn get_oca_bundle_ast( &self, said: SelfAddressingIdentifier, ) -> Result<OCAAst, Vec<String>>

Retrive steps (AST representation) for a given said

Source

pub fn parse_oca_bundle_to_ocafile( &self, bundle: &OCABundle, ) -> Result<String, Vec<String>>

Source§

impl Facade

Source

pub fn new( db: Box<dyn DataStorage>, db_cache: Box<dyn DataStorage>, cache_storage_config: SQLiteConfig, ) -> Self

Source

pub fn storage(&self) -> &dyn DataStorage

Auto Trait Implementations§

§

impl Freeze for Facade

§

impl !RefUnwindSafe for Facade

§

impl Send for Facade

§

impl !Sync for Facade

§

impl Unpin for Facade

§

impl !UnwindSafe for Facade

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V