pub struct TemplateMarketplace { /* private fields */ }Expand description
Template marketplace
Implementations§
Source§impl TemplateMarketplace
impl TemplateMarketplace
Sourcepub fn publish_template(
&mut self,
template: OrchestrationTemplate,
) -> Result<(), String>
pub fn publish_template( &mut self, template: OrchestrationTemplate, ) -> Result<(), String>
Publish a template
Sourcepub fn get_template(&self, template_id: &str) -> Option<&OrchestrationTemplate>
pub fn get_template(&self, template_id: &str) -> Option<&OrchestrationTemplate>
Get a template by ID
Sourcepub fn search_templates(
&self,
filters: TemplateSearchFilters,
) -> Vec<OrchestrationTemplate>
pub fn search_templates( &self, filters: TemplateSearchFilters, ) -> Vec<OrchestrationTemplate>
Search templates
Sourcepub fn download_template(
&mut self,
template_id: &str,
) -> Result<OrchestrationTemplate, String>
pub fn download_template( &mut self, template_id: &str, ) -> Result<OrchestrationTemplate, String>
Download a template
Sourcepub fn add_review(&mut self, review: TemplateReview) -> Result<(), String>
pub fn add_review(&mut self, review: TemplateReview) -> Result<(), String>
Add a review
Sourcepub fn get_reviews(&self, template_id: &str) -> Vec<TemplateReview>
pub fn get_reviews(&self, template_id: &str) -> Vec<TemplateReview>
Get reviews for a template
Sourcepub fn get_popular_templates(&self, limit: usize) -> Vec<OrchestrationTemplate>
pub fn get_popular_templates(&self, limit: usize) -> Vec<OrchestrationTemplate>
Get popular templates
Sourcepub fn get_templates_by_category(
&self,
category: TemplateCategory,
) -> Vec<OrchestrationTemplate>
pub fn get_templates_by_category( &self, category: TemplateCategory, ) -> Vec<OrchestrationTemplate>
Get templates by category
Sourcepub fn get_user_templates(
&self,
author_email: &str,
) -> Vec<OrchestrationTemplate>
pub fn get_user_templates( &self, author_email: &str, ) -> Vec<OrchestrationTemplate>
Get user templates
Sourcepub fn update_template(
&mut self,
template_id: &str,
updates: OrchestrationTemplate,
) -> Result<(), String>
pub fn update_template( &mut self, template_id: &str, updates: OrchestrationTemplate, ) -> Result<(), String>
Update template
Sourcepub fn template_count(&self) -> usize
pub fn template_count(&self) -> usize
Get template count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemplateMarketplace
impl RefUnwindSafe for TemplateMarketplace
impl Send for TemplateMarketplace
impl Sync for TemplateMarketplace
impl Unpin for TemplateMarketplace
impl UnwindSafe for TemplateMarketplace
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§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