pub struct Prompts { /* private fields */ }
Implementations§
Source§impl Prompts
impl Prompts
pub fn new(storage: Box<dyn Storage + Send + Sync>) -> Self
pub async fn add_prompt(&self, prompt: &mut Prompt) -> Result<bool>
pub async fn list_prompts( &self, tags: Option<Vec<String>>, ) -> Result<Vec<Prompt>>
pub async fn show_prompt( &self, query: &str, tags: Option<Vec<String>>, ) -> Result<Vec<Prompt>>
pub async fn edit_prompt( &self, hash: &str, new_text: Option<String>, add_tags: Option<Vec<String>>, remove_tags: Option<Vec<String>>, add_categories: Option<Vec<String>>, remove_categories: Option<Vec<String>>, ) -> Result<()>
pub async fn delete_prompt(&self, hash: &str) -> Result<()>
Auto Trait Implementations§
impl Freeze for Prompts
impl !RefUnwindSafe for Prompts
impl Send for Prompts
impl Sync for Prompts
impl Unpin for Prompts
impl !UnwindSafe for Prompts
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request