pub struct User {
pub id: Uuid,
}Fields§
§id: UuidImplementations§
Source§impl User
impl User
pub async fn add_account(&self, script: &[u8]) -> Result<Account, ServerError>
pub async fn create_account( &self, name: &str, parent: Option<Uuid>, ) -> Result<Account, ServerError>
pub async fn set_account_tag( &self, a: &Account, t: &Tag, ) -> Result<(), ServerError>
pub async fn list_transaction_ids_by_account( &self, account_id: Uuid, ) -> Result<Vec<Uuid>, ServerError>
pub async fn get_account_tag( &self, a: &Account, tag: &String, ) -> Result<Tag, ServerError>
Source§impl User
impl User
pub async fn add_commodity( &self, script: &[u8], ) -> Result<Commodity, ServerError>
pub async fn create_commodity( &self, symbol: String, name: String, ) -> Result<Commodity, ServerError>
pub async fn set_commodity_tag( &self, c: &Commodity, t: &Tag, ) -> Result<(), ServerError>
pub async fn get_commodity_tag( &self, c: &Commodity, tag: &String, ) -> Result<Tag, ServerError>
Source§impl User
impl User
pub async fn list_scripts(&self) -> Result<Vec<ScriptInfo>, ServerError>
pub async fn get_script(&self, id: Uuid) -> Result<ScriptDetail, ServerError>
pub async fn create_script( &self, bytecode: Vec<u8>, name: Option<String>, ) -> Result<Uuid, ServerError>
pub async fn update_script_bytecode( &self, id: Uuid, bytecode: Vec<u8>, ) -> Result<(), ServerError>
pub async fn delete_script(&self, id: Uuid) -> Result<(), ServerError>
pub async fn set_script_enabled( &self, id: Uuid, enabled: bool, ) -> Result<(), ServerError>
pub async fn update_script_name( &self, id: Uuid, name: Option<String>, ) -> Result<(), ServerError>
Source§impl User
impl User
pub async fn create_tag( &self, name: String, value: String, description: Option<String>, ) -> Result<Uuid, ServerError>
pub async fn get_tag(&self, id: Uuid) -> Result<Tag, ServerError>
pub async fn update_tag( &self, id: Uuid, name: String, value: String, description: Option<String>, ) -> Result<(), ServerError>
pub async fn create_transaction_tag( &self, tx_id: Uuid, name: String, value: String, description: Option<String>, ) -> Result<Uuid, ServerError>
Sourcepub async fn delete_tag(&self, id: Uuid) -> Result<(), ServerError>
pub async fn delete_tag(&self, id: Uuid) -> Result<(), ServerError>
Cascade-delete a tag: detach from every join table, then drop the
row from tags. Used by user-initiated tag deletion in the UI;
see detach_*_tag + cleanup_orphan_tag for the
“remove from one entity, drop only if no longer referenced”
pattern.
pub async fn detach_transaction_tag( &self, tx_id: Uuid, tag_id: Uuid, ) -> Result<(), ServerError>
pub async fn detach_split_tag( &self, split_id: Uuid, tag_id: Uuid, ) -> Result<(), ServerError>
pub async fn detach_account_tag( &self, account_id: Uuid, tag_id: Uuid, ) -> Result<(), ServerError>
pub async fn detach_commodity_tag( &self, commodity_id: Uuid, tag_id: Uuid, ) -> Result<(), ServerError>
Sourcepub async fn cleanup_orphan_tag(&self, tag_id: Uuid) -> Result<(), ServerError>
pub async fn cleanup_orphan_tag(&self, tag_id: Uuid) -> Result<(), ServerError>
If tag_id is no longer referenced by any join table, delete the
canonical row. Idempotent.
pub async fn list_tag_names( &self, scope: TagScope, ) -> Result<Vec<String>, ServerError>
pub async fn list_tag_values_for( &self, scope: TagScope, tag_name: &str, ) -> Result<Vec<String>, ServerError>
pub async fn list_transaction_tag_names( &self, ) -> Result<Vec<String>, ServerError>
pub async fn list_transaction_tag_values( &self, tag_name: &str, ) -> Result<Vec<String>, ServerError>
pub async fn create_split_tag( &self, split_id: Uuid, name: String, value: String, description: Option<String>, ) -> Result<Uuid, ServerError>
pub async fn create_account_tag( &self, account_id: Uuid, name: String, value: String, description: Option<String>, ) -> Result<Uuid, ServerError>
pub async fn list_account_tag_names(&self) -> Result<Vec<String>, ServerError>
pub async fn list_account_tag_values( &self, tag_name: &str, ) -> Result<Vec<String>, ServerError>
pub async fn list_split_tag_names(&self) -> Result<Vec<String>, ServerError>
pub async fn list_split_tag_values( &self, tag_name: &str, ) -> Result<Vec<String>, ServerError>
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl UnwindSafe for User
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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