Struct noosphere_cli::content::Content
source · pub struct Content {
pub matched: BTreeMap<String, FileReference>,
pub ignored: BTreeSet<String>,
}Expand description
A manifest of content to apply some work to in the local content space
Fields§
§matched: BTreeMap<String, FileReference>Content in the workspace that can be considered for inclusion in the sphere’s content space
ignored: BTreeSet<String>Content in the workspace that has been ignored
Implementations§
source§impl Content
impl Content
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if no content has been found that can be included in the sphere’s content space
sourcepub async fn read_all<S: BlockStore>(
paths: &SpherePaths,
store: &mut S
) -> Result<Content>
pub async fn read_all<S: BlockStore>( paths: &SpherePaths, store: &mut S ) -> Result<Content>
Read the local content of the workspace in its entirety. This includes files that have not yet been saved to the sphere. All files are chunked into blocks, and those blocks are persisted to the provided store.
sourcepub async fn read_changes(
workspace: &Workspace
) -> Result<Option<(Content, ContentChanges, MemoryStore)>>
pub async fn read_changes( workspace: &Workspace ) -> Result<Option<(Content, ContentChanges, MemoryStore)>>
Read all changed content in the sphere’s workspace. Changed content will include anything that has been modified, moved or deleted. The blocks associated with the changed content will be included in the returned MemoryStore.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
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