Struct theca::Profile
[−]
[src]
pub struct Profile { pub encrypted: bool, pub notes: Vec<Item>, }
Main container of a theca profile file
Fields
encrypted: bool
notes: Vec<Item>
Methods
impl Profile
[src]
fn new(
profile_name: &str,
profile_folder: &str,
key: &str,
new_profile: bool,
encrypted: bool,
yes: bool
) -> Result<(Profile, u64)>
profile_name: &str,
profile_folder: &str,
key: &str,
new_profile: bool,
encrypted: bool,
yes: bool
) -> Result<(Profile, u64)>
setup a Profile struct based on the command line arguments
fn clear(&mut self, yes: bool) -> Result<()>
remove all notes from the profile
fn save_to_file(&mut self, args: &Args, fingerprint: &u64) -> Result<()>
save the profile back to file (either plaintext or encrypted)
fn transfer_note(&mut self, args: &Args) -> Result<()>
transfer a note from the profile to another profile
fn add_note(
&mut self,
title: &str,
body: &[String],
status: Option<Status>,
use_stdin: bool,
use_editor: bool,
print_msg: bool
) -> Result<()>
&mut self,
title: &str,
body: &[String],
status: Option<Status>,
use_stdin: bool,
use_editor: bool,
print_msg: bool
) -> Result<()>
add a item to the profile
fn delete_note(&mut self, id: &[usize])
delete an item from the profile
fn edit_note(
&mut self,
id: usize,
title: &str,
body: &[String],
status: Option<Status>,
use_stdin: bool,
flags: BoolFlags
) -> Result<()>
&mut self,
id: usize,
title: &str,
body: &[String],
status: Option<Status>,
use_stdin: bool,
flags: BoolFlags
) -> Result<()>
edit an item in the profile
fn stats(&mut self, name: &str) -> Result<()>
print information about the profile
fn view_note(&mut self, id: usize, json: bool, condensed: bool) -> Result<()>
print a full item
fn list_notes(
&mut self,
limit: usize,
flags: BoolFlags,
status: Option<Status>
) -> Result<()>
&mut self,
limit: usize,
flags: BoolFlags,
status: Option<Status>
) -> Result<()>
print all notes in the profile
fn search_notes(
&mut self,
pattern: &str,
limit: usize,
flags: BoolFlags,
status: Option<Status>
) -> Result<()>
&mut self,
pattern: &str,
limit: usize,
flags: BoolFlags,
status: Option<Status>
) -> Result<()>
print notes search for in the profile
Trait Implementations
impl Decodable for Profile
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Profile, __D::Error>
Deserialize a value using a Decoder
.
impl Encodable for Profile
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
Serialize a value using an Encoder
.
impl Clone for Profile
[src]
fn clone(&self) -> Profile
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more