mirror of
				https://git.proxmox.com/git/proxmox
				synced 2025-10-31 01:20:44 +00:00 
			
		
		
		
	api types: namespace: add from_parent_ns helper
will be used in the (recursive) namespace iterator Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
		
							parent
							
								
									1682d9ae0d
								
							
						
					
					
						commit
						0cd80471d0
					
				| @ -553,6 +553,16 @@ impl BackupNamespace { | ||||
|         Ok(this) | ||||
|     } | ||||
| 
 | ||||
|     /// Create a new Namespace attached to parent
 | ||||
|     ///
 | ||||
|     /// `name` must be a single level namespace ID, that is, no '/' is allowed.
 | ||||
|     /// This rule also avoids confusion about the name being a NS or NS-path
 | ||||
|     pub fn from_parent_ns(parent: &Self, name: String) -> Result<Self, Error> { | ||||
|         let mut child = parent.to_owned(); | ||||
|         child.push(name)?; | ||||
|         Ok(child) | ||||
|     } | ||||
| 
 | ||||
|     /// Create a new namespace directly from a vec.
 | ||||
|     ///
 | ||||
|     /// # Safety
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thomas Lamprecht
						Thomas Lamprecht