pub struct EditContext { /* private fields */ }Implementations§
Source§impl EditContext
impl EditContext
pub fn apply_diff(&mut self, diff: &DataSetDiff) -> DataSetResult<()>
pub fn new( project_config: &HydrateProjectConfiguration, edit_context_key: EditContextKey, schema_set: SchemaSet, undo_stack: &UndoStack, ) -> Self
pub fn new_with_data( project_config: &HydrateProjectConfiguration, edit_context_key: EditContextKey, schema_set: SchemaSet, undo_stack: &UndoStack, ) -> Self
pub fn with_undo_context<F: FnOnce(&mut Self) -> EndContextBehavior>( &mut self, name: &'static str, f: F, )
pub fn commit_pending_undo_context(&mut self)
pub fn cancel_pending_undo_context(&mut self) -> DataSetResult<()>
pub fn schema_set(&self) -> &SchemaSet
pub fn schemas(&self) -> &HashMap<SchemaFingerprint, SchemaNamedType>
pub fn data_set(&self) -> &DataSet
pub fn assets(&self) -> &HashMap<AssetId, DataSetAssetInfo>
pub fn has_asset(&self, asset_id: AssetId) -> bool
pub fn new_asset_with_id( &mut self, asset_id: AssetId, asset_name: &AssetName, asset_location: &AssetLocation, schema: &SchemaRecord, ) -> DataSetResult<()>
pub fn new_asset( &mut self, asset_name: &AssetName, asset_location: &AssetLocation, schema: &SchemaRecord, ) -> AssetId
pub fn new_asset_from_prototype( &mut self, asset_name: &AssetName, asset_location: &AssetLocation, prototype: AssetId, ) -> DataSetResult<AssetId>
pub fn init_from_single_object( &mut self, asset_id: AssetId, asset_name: AssetName, asset_location: AssetLocation, single_object: &SingleObject, ) -> DataSetResult<()>
pub fn restore_assets_from(&mut self, data_set: DataSet) -> DataSetResult<()>
pub fn duplicate_asset(&mut self, asset_id: AssetId) -> DataSetResult<AssetId>
pub fn delete_asset(&mut self, asset_id: AssetId) -> DataSetResult<()>
pub fn set_asset_location( &mut self, asset_id: AssetId, new_location: AssetLocation, ) -> DataSetResult<()>
pub fn set_import_info( &mut self, asset_id: AssetId, import_info: ImportInfo, ) -> DataSetResult<()>
pub fn asset_name(&self, asset_id: AssetId) -> DataSetResult<&AssetName>
pub fn asset_name_or_id_string( &self, asset_id: AssetId, ) -> DataSetResult<String>
pub fn set_asset_name( &mut self, asset_id: AssetId, asset_name: AssetName, ) -> DataSetResult<()>
pub fn asset_location(&self, asset_id: AssetId) -> Option<AssetLocation>
pub fn asset_location_chain( &self, asset_id: AssetId, ) -> DataSetResult<Vec<AssetLocation>>
pub fn import_info(&self, asset_id: AssetId) -> Option<&ImportInfo>
pub fn resolve_path_reference<P: Into<PathReference>>( &self, asset_id: AssetId, path: P, ) -> DataSetResult<Option<AssetId>>
pub fn resolve_canonical_path_reference( &self, asset_id: AssetId, canonical_path: &CanonicalPathReference, ) -> DataSetResult<Option<AssetId>>
pub fn resolve_all_path_reference_overrides( &self, asset_id: AssetId, ) -> DataSetResult<HashMap<CanonicalPathReference, AssetId>>
pub fn get_all_path_reference_overrides( &mut self, asset_id: AssetId, ) -> Option<&HashMap<CanonicalPathReference, AssetId>>
pub fn set_path_reference_override( &mut self, asset_id: AssetId, path: CanonicalPathReference, referenced_asset_id: AssetId, ) -> DataSetResult<()>
pub fn asset_prototype(&self, asset_id: AssetId) -> Option<AssetId>
pub fn asset_schema(&self, asset_id: AssetId) -> Option<&SchemaRecord>
pub fn get_null_override( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<NullOverride>
pub fn set_null_override( &mut self, asset_id: AssetId, path: impl AsRef<str>, null_override: NullOverride, ) -> DataSetResult<()>
pub fn resolve_null_override( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<NullOverride>
pub fn has_property_override( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<bool>
pub fn get_property_override( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<Option<&Value>>
pub fn set_property_override( &mut self, asset_id: AssetId, path: impl AsRef<str>, value: Option<Value>, ) -> DataSetResult<Option<Value>>
pub fn apply_property_override_to_prototype( &mut self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<()>
pub fn resolve_property( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<&Value>
pub fn get_dynamic_array_entries( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<Iter<'_, Uuid>>
pub fn get_map_entries( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<Iter<'_, Uuid>>
pub fn add_dynamic_array_entry( &mut self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<Uuid>
pub fn add_map_entry( &mut self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<Uuid>
pub fn insert_dynamic_array_entry( &mut self, asset_id: AssetId, path: impl AsRef<str>, index: usize, entry_uuid: Uuid, ) -> DataSetResult<()>
pub fn remove_dynamic_array_entry( &mut self, asset_id: AssetId, path: impl AsRef<str>, element_id: Uuid, ) -> DataSetResult<bool>
pub fn remove_map_entry( &mut self, asset_id: AssetId, path: impl AsRef<str>, element_id: Uuid, ) -> DataSetResult<bool>
pub fn resolve_dynamic_array_entries( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<Box<[Uuid]>>
pub fn resolve_map_entries( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<Box<[Uuid]>>
pub fn get_override_behavior( &self, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<OverrideBehavior>
pub fn set_override_behavior( &mut self, asset_id: AssetId, path: impl AsRef<str>, behavior: OverrideBehavior, ) -> DataSetResult<()>
pub fn read_properties_bundle( &self, schema_set: &SchemaSet, asset_id: AssetId, path: impl AsRef<str>, ) -> DataSetResult<PropertiesBundle>
pub fn write_properties_bundle( &mut self, schema_set: &SchemaSet, asset_id: AssetId, path: impl AsRef<str>, properties_bundle: &PropertiesBundle, ) -> DataSetResult<()>
Trait Implementations§
Source§impl DynEditContext for EditContext
impl DynEditContext for EditContext
Source§impl RestoreAssetFromStorageImpl for EditContext
impl RestoreAssetFromStorageImpl for EditContext
fn restore_asset( &mut self, asset_id: AssetId, asset_name: AssetName, asset_location: AssetLocation, import_info: Option<ImportInfo>, build_info: BuildInfo, prototype: Option<AssetId>, schema: SchemaFingerprint, properties: HashMap<String, Value>, property_null_overrides: HashMap<String, NullOverride>, properties_in_replace_mode: HashSet<String>, dynamic_collection_entries: HashMap<String, OrderedSet<Uuid>>, ) -> DataSetResult<()>
fn namespace_resolver(&self) -> &dyn PathReferenceNamespaceResolver
Auto Trait Implementations§
impl Freeze for EditContext
impl RefUnwindSafe for EditContext
impl Send for EditContext
impl Sync for EditContext
impl Unpin for EditContext
impl UnwindSafe for EditContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more