pub struct Folder { /* private fields */ }Expand description
A served folder opened on its entry document.
Implementations§
Source§impl Folder
impl Folder
Sourcepub fn matters(&self, path: &Path, is_dir: bool) -> bool
pub fn matters(&self, path: &Path, is_dir: bool) -> bool
Whether a change to path can matter to anyone: not under .git,
and either in sight or named by its site’s watch list. A comment
thread always matters; nothing else under .devpage/ does. Decided
from the path alone — no file system call — so a build rewriting an
ignored folder costs a lookup per path. A path not under the served
folder as given is kept, to be judged once canonical.
Source§impl Folder
impl Folder
Sourcepub fn new(entry: Arc<Document>) -> Self
pub fn new(entry: Arc<Document>) -> Self
The served folder entry was loaded from, indexed, with entry as
its entry document.
Sourcepub fn served(&self) -> &ServedFolder
pub fn served(&self) -> &ServedFolder
The served folder.
Sourcepub fn entry_error(&self) -> Option<String>
pub fn entry_error(&self) -> Option<String>
Why the entry’s file can’t be read as a document, if it can’t now.
Sourcepub fn entry_file(&self) -> &Path
pub fn entry_file(&self) -> &Path
The entry’s file: a document file, or a Markdown file served as a doc.
Sourcepub fn site(&self, page: &Path) -> Option<PathBuf>
pub fn site(&self, page: &Path) -> Option<PathBuf>
The document file of the nearest site whose folder holds page,
unloaded; None when no site does.
Sourcepub fn owner(&self, page: &Path) -> Option<Owner>
pub fn owner(&self, page: &Path) -> Option<Owner>
The nearest site whose folder holds page, loaded now; None when
no site does.
Sourcepub fn widgets_owner(&self, folder: &Path) -> Option<Arc<Document>>
pub fn widgets_owner(&self, folder: &Path) -> Option<Arc<Document>>
The document whose widgets folder is folder: the entry document
when it names it, or else the first indexed document that does.
Sourcepub fn changed(&self, paths: &[PathBuf]) -> Changed
pub fn changed(&self, paths: &[PathBuf]) -> Changed
paths — canonical, or as reported when gone — changed, appeared or
vanished: the index and the entry follow them, and what that means
comes back. A path outside the folder or under .devpage/ is not the
folder’s. The entry’s own file refreshes open pages whatever watch
says; any other path in sight refreshes them as its site’s watch
list decides.
Auto Trait Implementations§
impl !Freeze for Folder
impl Forget for Folder
impl RefUnwindSafe for Folder
impl Send for Folder
impl Sync for Folder
impl Unpin for Folder
impl UnsafeUnpin for Folder
impl UnwindSafe for Folder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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> ⓘ
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> ⓘ
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