Enum wildland_corex::StorageTemplate
source · pub enum StorageTemplate {
V1(StorageTemplateV1),
}
Expand description
Storage Templates provide some general information about storage location. Their only purpose is to be filled with the container’s parameters during container creation and to generate Storage Manifest (in opposition to a template it points to the storage location assigned to the particular container).
Variants§
Implementations§
source§impl StorageTemplate
impl StorageTemplate
sourcepub fn new(
backend_type: impl ToString,
template: ValidatedTemplateData,
name: Option<String>
) -> Self
pub fn new( backend_type: impl ToString, template: ValidatedTemplateData, name: Option<String> ) -> Self
Creates new StorageTemplate
Args:
backend_type
- string defining backend typetemplate
- validated template specific fields (“template” property of a whole Storage Template object)
pub fn set_catlib_uuid(&mut self, uuid: Uuid)
pub fn name(&self) -> Option<String>
pub fn set_name(&mut self, name: String)
pub fn to_json(&self) -> Result<String, StorageTemplateError>
pub fn to_yaml(&self) -> Result<String, StorageTemplateError>
pub fn backend_type(&self) -> String
sourcepub fn catlib_uuid(&self) -> Option<Uuid>
pub fn catlib_uuid(&self) -> Option<Uuid>
If returned Some(_) then this template has been written to Catalog Backend which gave it an id. Otherwise it returns None
pub fn render( &self, params: TemplateContext ) -> Result<RenderedStorage, StorageTemplateError>
Trait Implementations§
source§impl Clone for StorageTemplate
impl Clone for StorageTemplate
source§fn clone(&self) -> StorageTemplate
fn clone(&self) -> StorageTemplate
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StorageTemplate
impl Debug for StorageTemplate
source§impl<'de> Deserialize<'de> for StorageTemplate
impl<'de> Deserialize<'de> for StorageTemplate
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for StorageTemplate
impl Send for StorageTemplate
impl Sync for StorageTemplate
impl Unpin for StorageTemplate
impl UnwindSafe for StorageTemplate
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