pub struct NoteBuilder {
pub path: PathBuf,
pub id: String,
pub title: Option<String>,
pub aliases: Vec<String>,
pub tags: Vec<LocatedTag>,
pub body: Option<String>,
}Fields§
§path: PathBuf§id: String§title: Option<String>§aliases: Vec<String>§body: Option<String>Implementations§
Source§impl NoteBuilder
impl NoteBuilder
pub fn new(path: impl AsRef<Path>) -> Result<Self, NoteError>
pub fn id(self, id: &str) -> Self
pub fn title(self, title: &str) -> Self
pub fn alias(self, alias: &str) -> Self
pub fn aliases(self, aliases: &[String]) -> Self
pub fn tag(self, tag: &str) -> Self
pub fn located_tag(self, tag: &LocatedTag) -> Self
pub fn body(self, body: &str) -> Self
pub fn build(self) -> Result<Note, NoteError>
Trait Implementations§
Source§impl Clone for NoteBuilder
impl Clone for NoteBuilder
Source§fn clone(&self) -> NoteBuilder
fn clone(&self) -> NoteBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NoteBuilder
impl RefUnwindSafe for NoteBuilder
impl Send for NoteBuilder
impl Sync for NoteBuilder
impl Unpin for NoteBuilder
impl UnsafeUnpin for NoteBuilder
impl UnwindSafe for NoteBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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