ProjectWorkspace
struct · ferroui-designer-project · v0.5.0
struct ProjectWorkspace
Members
solutionnewbuffersbufferactive_uriactivateopencreateupdate_sourceapply_updatesstore_documentsaveacknowledge_savedsave_with_policysave_asclosereloadrename_documentregister_resourceresolve_path
solution
solution: crate::Solution
new
fn new(solution: Solution) -> Self
buffers
fn buffers(self: &Self) -> impl Iterator<Item = &Buffer>
buffer
fn buffer(self: &Self, uri: &str) -> Option<&Buffer>
active_uri
fn active_uri(self: &Self) -> Option<&str>
activate
fn activate(self: &mut Self, uri: &str) -> Result<()>
open
fn open(self: &mut Self, uri: &str) -> Result<&Buffer>
create
fn create(self: &mut Self, uri: impl Into<String>, source: impl Into<String>) -> Result<&Buffer>
update_source
fn update_source(self: &mut Self, uri: &str, expected_version: u64, source: impl Into<String>) -> Result<()>
apply_updates
fn apply_updates(self: &mut Self, updates: Vec<BufferUpdate>) -> Result<()>
Validate all versions and candidates before committing any buffer in a refactoring.
store_document
fn store_document(self: &mut Self, uri: &str, expected_version: u64, document: Document) -> Result<()>
Preserve the native designer's complete undo/redo history when storing an inactive tab.
save
fn save(self: &mut Self, uri: &str) -> Result<()>
acknowledge_saved
fn acknowledge_saved(self: &mut Self, uri: &str, expected_version: u64, saved_source: impl Into<String>) -> Result<()>
Record a successful host/provider save without IO or resetting tab history. The saved snapshot may predate current authored text after an asynchronous write.
save_with_policy
fn save_with_policy(self: &mut Self, uri: &str, policy: SavePolicy) -> Result<()>
save_as
fn save_as(self: &mut Self, uri: &str, path: impl AsRef<Path>) -> Result<String>
close
fn close(self: &mut Self, uri: &str, discard: bool) -> Result<()>
reload
fn reload(self: &mut Self, uri: &str, discard: bool) -> Result<()>
rename_document
fn rename_document(self: &mut Self, uri: &str, new_path: impl AsRef<Path>) -> Result<String>
register_resource
fn register_resource(self: &mut Self, uri: impl Into<String>, path: impl AsRef<Path>) -> Result<()>
Register a host-defined embedded-resource key without allowing it to bypass root checks.
resolve_path
fn resolve_path(self: &Self, uri: &str) -> Result<PathBuf>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.