[−][src]Struct deadwiki::db::DB
Implementations
impl DB
[src]
pub fn new<S: AsRef<str>>(root: S) -> DB
[src]
Create a new DB object. Should only have one per run.
pub fn is_empty(&self) -> bool
[src]
Is this DB empty?
pub fn len(&self) -> usize
[src]
How many wiki pages have been created?
pub fn find(&self, name: &str) -> Option<Page>
[src]
Find a single wiki page by name.
pub fn exists(&self, name: &str) -> bool
[src]
Check if a wiki page exists by name.
pub fn pages(&self) -> Result<Vec<Page>>
[src]
All the wiki pages, in alphabetical order.
pub fn names(&self) -> Result<Vec<String>>
[src]
All the wiki page names, in alphabetical order.
pub fn titles(&self) -> Result<Vec<String>>
[src]
All the wiki page titles, in alphabetical order.
pub fn recent(&self) -> Result<Vec<Page>>
[src]
Recently modified wiki pages.
pub fn tags(&self) -> Result<Vec<String>>
[src]
All the tags used, in alphabetical order.
pub fn find_pages_with_tag(&self, tag: &str) -> Result<Vec<Page>>
[src]
pub fn create(&self, name: &str, body: &str) -> Result<Page>
[src]
Create a new wiki page on disk. Name should be the title, such as "Linux Laptops" - it'll get converted to linux_laptops.md.
pub fn update(&self, name: &str, body: &str) -> Result<Page>
[src]
Save a page to disk. Doesn't track renames, just content changes for now.
pub fn absolute_path(&self, path: &str) -> String
[src]
Get an FS path to a file, without changing case or characters.
pub fn is_git(&self) -> bool
[src]
Is this DB tracked with git?
pub fn title_to_name(title: &str) -> String
[src]
"Keyboard Shortcut" -> "Keyboard_Shortcut"
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,