Struct hit_data::Hit

source ·
pub struct Hit {
    pub index: Index,
    pub kernel: Rc<HitKernel>,
    /* private fields */
}

Fields§

§index: Index§kernel: Rc<HitKernel>

Implementations§

source§

impl Hit

source

pub fn new( id: &str, model_type: &str, kernel: Rc<HitKernel> ) -> Result<Hit, HitError>

source

pub fn import( &mut self, hit: Hit, parent: IndexEntryProperty ) -> Result<(), HitError>

source

pub fn new_with_values( id: &str, kernel: Rc<HitKernel>, values: ObjectValues, model_type: &str ) -> Result<Hit, HitError>

source

pub fn contains_key(&self, key: &str) -> bool

source

pub fn insert_reference( &mut self, id: &str, target: IndexEntryProperty, before_id: Option<String> ) -> Result<(), HitError>

source

pub fn remove_reference( &mut self, id: &str, parent: IndexEntryProperty ) -> Result<(), HitError>

source

pub fn move_reference( &mut self, id: &str, target: IndexEntryProperty, before_id: Option<Id> ) -> Result<(), HitError>

source

pub fn get_references( &self, id: &str ) -> Result<Vec<IndexEntryProperty>, HitError>

source

pub fn find_references_recursive( &self, id: &str ) -> Result<(HashMap<String, Vec<IndexEntryProperty>>, Vec<String>), HitError>

source

pub fn remove_object(&mut self, id: &str) -> Result<Vec<String>, HitError>

source

pub fn can_move_object( &self, id: &str, target_id: &str, target_model: &str, property: &str ) -> Result<(), HitError>

source

pub fn move_object( &mut self, id: &str, target: IndexEntryProperty, before_id: Option<String> ) -> Result<(), HitError>

source

pub fn copy_object( &mut self, id: Id, target: IndexEntryProperty, before_id: Option<String> ) -> Result<Id, HitError>

source

pub fn get_model(&self, id: &str) -> Option<Rc<Model>>

source

pub fn get(&self, id: &str) -> Option<HitEntry>

source

pub fn get_value(&self, id: &str, property: &str) -> Option<ObjectValue>

source

pub fn set( &mut self, id: &str, property: &str, value: ObjectValue ) -> Result<(), HitError>

source

pub fn insert( &mut self, model_type: &str, id: &str, values: ObjectValues, parent: IndexEntryProperty, before_id: Option<String> ) -> Result<(), HitError>

source

pub fn get_plugins(&self) -> &Plugins

source

pub fn get_main_object_id(&self) -> &Id

source

pub fn subscribe_field( &self, id: &str, field: &str, listener: FieldListenerRef<ObjectValue> ) -> Result<String, HitError>

source

pub fn unsubscribe_field( &self, id: &str, field: &str, listener_id: &str ) -> Result<(), HitError>

source

pub fn get_parent(&self, id: &str) -> Option<IndexEntryProperty>

source

pub fn get_parent_index(&self, id: &str) -> Option<usize>

source

pub fn validate_field( &mut self, id: &str, property: &str ) -> Result<(), HitError>

source

pub fn get_validation_errors( &self, id: &str, field: &str ) -> Option<&Vec<ValidationError>>

source

pub fn subscribe_field_validation( &mut self, id: &str, field: &str, listener: FieldListenerRef<Vec<ValidationError>> )

source

pub fn unsubscribe_field_validation( &mut self, id: &str, field: &str, listener_id: &str ) -> Result<(), HitError>

Trait Implementations§

source§

impl Clone for Hit

source§

fn clone(&self) -> Hit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Hit

§

impl !Send for Hit

§

impl !Sync for Hit

§

impl Unpin for Hit

§

impl !UnwindSafe for Hit

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> Any for T
where T: Any,

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.
§

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

§

fn vzip(self) -> V