Struct EditorModel

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

Implementations§

Source§

impl EditorModel

Source

pub fn new( project_config: HydrateProjectConfiguration, schema_set: SchemaSet, ) -> Self

Source

pub fn path_node_schema(&self) -> &SchemaNamedType

Source

pub fn path_node_root_schema(&self) -> &SchemaNamedType

Source

pub fn data_sources(&self) -> &HashMap<AssetSourceId, Box<dyn DataSource>>

Source

pub fn is_path_node_or_root(&self, fingerprint: SchemaFingerprint) -> bool

Source

pub fn is_generated_asset(&self, asset_id: AssetId) -> bool

Source

pub fn persist_generated_asset(&mut self, asset_id: AssetId)

Source

pub fn commit_all_pending_undo_contexts(&mut self)

Source

pub fn cancel_all_pending_undo_contexts(&mut self)

Source

pub fn any_edit_context_has_unsaved_changes(&self) -> bool

Source

pub fn pending_file_operations(&self) -> PendingFileOperations

Source

pub fn schema_set(&self) -> &SchemaSet

Source

pub fn clone_schema_set(&self) -> SchemaSet

Source

pub fn root_edit_context(&self) -> &EditContext

Source

pub fn root_edit_context_mut(&mut self) -> &mut EditContext

Source

pub fn asset_path( &self, asset_id: AssetId, asset_path_cache: &AssetPathCache, ) -> Option<AssetPath>

Source

pub fn asset_display_name_long( &self, asset_id: AssetId, asset_path_cache: &AssetPathCache, ) -> String

Source

pub fn data_source( &mut self, asset_source_id: AssetSourceId, ) -> Option<&dyn DataSource>

Source

pub fn is_a_root_asset(&self, asset_id: AssetId) -> bool

Source

pub fn add_file_system_id_based_asset_source<RootPathT: Into<PathBuf>>( &mut self, project_config: &HydrateProjectConfiguration, data_source_name: &str, file_system_root_path: RootPathT, import_job_to_queue: &mut ImportJobToQueue, ) -> AssetSourceId

Source

pub fn add_file_system_path_based_data_source<RootPathT: Into<PathBuf>>( &mut self, project_config: &HydrateProjectConfiguration, data_source_name: &str, file_system_root_path: RootPathT, importer_registry: &ImporterRegistry, import_jobs_to_queue: &mut ImportJobToQueue, ) -> AssetSourceId

Source

pub fn save_root_edit_context(&mut self)

Source

pub fn revert_root_edit_context( &mut self, project_config: &HydrateProjectConfiguration, import_job_to_queue: &mut ImportJobToQueue, )

Source

pub fn close_file_system_source(&mut self, _asset_source_id: AssetSourceId)

Source

pub fn open_edit_context( &mut self, assets: &[AssetId], ) -> DataSetResult<EditContextKey>

Source

pub fn flush_edit_context_to_root( &mut self, edit_context: EditContextKey, ) -> DataSetResult<()>

Source

pub fn close_edit_context(&mut self, edit_context: EditContextKey)

Source

pub fn undo(&mut self) -> DataSetResult<()>

Source

pub fn redo(&mut self) -> DataSetResult<()>

Auto Trait Implementations§

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