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 Freeze for Content
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
Source§impl<T> FitForCBox for T
impl<T> FitForCBox for T
type CBoxWrapped = Box_<T>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more