pub trait CreateWorkspaceIoFunction {
// Required method
fn call<'life0, 'async_trait>(
&'life0 self,
config: Arc<Config>,
template_fields: Arc<HashMap<FieldKey, TemplateValue>>,
path_item: ResolvedPathItem,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A helper trait for running the create workspace logic.
The create_workspace function hands over the responsibility of creating files and folders to the type that implements this trait. The resolver does not assume anything about the permissions or ownership aside from “this path is owned by a user” or “this path is read only”.
Required Methods§
Sourcefn call<'life0, 'async_trait>(
&'life0 self,
config: Arc<Config>,
template_fields: Arc<HashMap<FieldKey, TemplateValue>>,
path_item: ResolvedPathItem,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
config: Arc<Config>,
template_fields: Arc<HashMap<FieldKey, TemplateValue>>,
path_item: ResolvedPathItem,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The function that gets called by the create_workspace function when building the workspace.