pub struct PromptService;Implementations§
Source§impl PromptService
impl PromptService
pub fn generate_prompt_id(name: &str, existing_ids: &[String]) -> String
pub fn get_prompts( state: &AppState, app: AppType, ) -> Result<HashMap<String, Prompt>, AppError>
pub fn upsert_prompt( state: &AppState, app: AppType, id: &str, prompt: Prompt, ) -> Result<(), AppError>
pub fn delete_prompt( state: &AppState, app: AppType, id: &str, ) -> Result<(), AppError>
pub fn rename_prompt( state: &AppState, app: AppType, id: &str, name: &str, ) -> Result<(), AppError>
pub fn create_prompt( state: &AppState, app: AppType, name: &str, content: &str, ) -> Result<Prompt, AppError>
pub fn enable_prompt( state: &AppState, app: AppType, id: &str, ) -> Result<(), AppError>
pub fn disable_prompt( state: &AppState, app: AppType, id: &str, ) -> Result<(), AppError>
pub fn import_from_file( state: &AppState, app: AppType, ) -> Result<String, AppError>
pub fn get_current_file_content( app: AppType, ) -> Result<Option<String>, AppError>
pub fn sync_all_active_to_live_best_effort( state: &AppState, ) -> Result<(), AppError>
Auto Trait Implementations§
impl Freeze for PromptService
impl RefUnwindSafe for PromptService
impl Send for PromptService
impl Sync for PromptService
impl Unpin for PromptService
impl UnsafeUnpin for PromptService
impl UnwindSafe for PromptService
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> 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>
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