Skip to main content

GtsOps

Struct GtsOps 

Source
pub struct GtsOps {
    pub verbose: usize,
    pub cfg: GtsConfig,
    pub path: Option<Vec<String>>,
    pub store: GtsStore,
}

Fields§

§verbose: usize§cfg: GtsConfig§path: Option<Vec<String>>§store: GtsStore

Implementations§

Source§

impl GtsOps

Source

pub fn new( path: Option<Vec<String>>, config: Option<String>, verbose: usize, ) -> Self

Source

pub fn reload_from_path(&mut self, path: &[String])

Source

pub fn add_entity( &mut self, content: &Value, validate: bool, ) -> GtsAddEntityResult

Source

pub fn add_entities(&mut self, items: &[Value]) -> GtsAddEntitiesResult

Source

pub fn add_schema( &mut self, type_id: String, schema: &Value, ) -> GtsAddSchemaResult

Source

pub fn validate_id(gts_id: &str) -> GtsIdValidationResult

Source

pub fn parse_id(gts_id: &str) -> GtsIdParseResult

Source

pub fn match_id_pattern(candidate: &str, pattern: &str) -> GtsIdMatchResult

Source

pub fn uuid(gts_id: &str) -> GtsUuidResult

Source

pub fn validate_instance(&mut self, gts_id: &str) -> GtsValidationResult

Source

pub fn validate_schema(&mut self, gts_id: &str) -> GtsValidationResult

Source

pub fn validate_entity(&mut self, gts_id: &str) -> GtsEntityValidationResult

Source

pub fn schema_graph(&mut self, gts_id: &str) -> GtsSchemaGraphResult

Source

pub fn compatibility( &mut self, old_type_id: &str, new_type_id: &str, ) -> GtsEntityCastResult

Source

pub fn cast(&mut self, from_id: &str, to_type_id: &str) -> GtsEntityCastResult

Source

pub fn query(&self, expr: &str, limit: usize) -> GtsStoreQueryResult

Source

pub fn attr(&mut self, gts_with_path: &str) -> JsonPathResolver

Source

pub fn extract_id(&self, content: &Value) -> GtsExtractIdResult

Source

pub fn get_entity(&mut self, gts_id: &str) -> GtsGetEntityResult

Source

pub fn get_entities(&self, limit: usize) -> GtsEntitiesListResult

Source

pub fn list(&self, limit: usize) -> GtsEntitiesListResult

Auto Trait Implementations§

§

impl !RefUnwindSafe for GtsOps

§

impl !Sync for GtsOps

§

impl !UnwindSafe for GtsOps

§

impl Freeze for GtsOps

§

impl Send for GtsOps

§

impl Unpin for GtsOps

§

impl UnsafeUnpin for GtsOps

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more