pub struct GetCategoryRequest {
pub ids: Vec<Uuid>,
pub scope: Option<CategoryTreeScope>,
}
Expand description
Request to get a tree of categories.
§Examples
There are a few different use cases.
§get root categories.
ⓘ
GetCategoryRequest { ids: vec![], scope: None }
Additionally, you can do the same with scope: Some(CategoryTreeScope::Ancestors)
but it is not considered the cannonical form.
§get all categories
ⓘ
GetCategoryRequest { ids: vec![], scope: Some(CategoryTreeScope::Descendants) }
§get exact categories
ⓘ
GetCategoryRequest { ids: vec![id1, id2, ...], scope: None }
§get exact categories and their ancestors
ⓘ
GetCategoryRequest { ids: vec![id1, id2, ...], scope: Some(CategoryTreeScope::Ancestors) }
§get exact categories and their decendants.
ⓘ
GetCategoryRequest { ids: vec![id1, id2, ...], scope: Some(CategoryTreeScope::Descendants) }
Fields§
§ids: Vec<Uuid>
The exact ids to be included in the response.
scope: Option<CategoryTreeScope>
Which direction to follow the tree.
Trait Implementations§
Source§impl Debug for GetCategoryRequest
impl Debug for GetCategoryRequest
Source§impl Default for GetCategoryRequest
impl Default for GetCategoryRequest
Source§fn default() -> GetCategoryRequest
fn default() -> GetCategoryRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GetCategoryRequest
impl<'de> Deserialize<'de> for GetCategoryRequest
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 Freeze for GetCategoryRequest
impl RefUnwindSafe for GetCategoryRequest
impl Send for GetCategoryRequest
impl Sync for GetCategoryRequest
impl Unpin for GetCategoryRequest
impl UnwindSafe for GetCategoryRequest
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