Struct samling::StylesRepo
source · pub struct StylesRepo;Implementations§
source§impl StylesRepo
impl StylesRepo
pub async fn list(
&self,
client: &impl GenericClient,
organization_id: Id<Organization>
) -> Result<Vec<Style>>
pub async fn list_collection_nested(
&self,
client: &impl GenericClient,
metadata: RequestMetaData,
collection_id: Id<Collection>,
filters: ResolvedStyleFilters,
sorter: NestedStyleSortOrder
) -> Result<Vec<NestedStyle>>
pub async fn list_nested_summary(
&self,
client: &impl GenericClient,
metadata: RequestMetaData,
filters: ResolvedStyleFilters
) -> Result<Vec<NestedStyleSummary>>
pub async fn find(
&self,
client: &impl GenericClient,
organization_id: Id<Organization>,
ref_: &Ref<Style>
) -> Result<Option<Style>>
pub async fn get(
&self,
client: &impl GenericClient,
organization_id: Id<Organization>,
ref_: &Ref<Style>
) -> Result<Style>
pub async fn get_nested(
&self,
client: &impl GenericClient,
metadata: RequestMetaData,
collection_id: Id<Collection>,
style_ref: &Ref<Style>
) -> Result<NestedStyle>
sourcepub async fn insert(
&self,
client: &mut Object,
organization_id: Id<Organization>,
created_by: Id<User>,
style: CreateStyle
) -> Result<Style>
pub async fn insert(
&self,
client: &mut Object,
organization_id: Id<Organization>,
created_by: Id<User>,
style: CreateStyle
) -> Result<Style>
Create a new Style entity
sourcepub async fn update(
&self,
client: &mut Object,
organization_id: Id<Organization>,
ref_: &Ref<Style>,
style: UpdateStyle
) -> Result<Style>
pub async fn update(
&self,
client: &mut Object,
organization_id: Id<Organization>,
ref_: &Ref<Style>,
style: UpdateStyle
) -> Result<Style>
Do a partial update of a Style entity
sourcepub async fn upsert(
&self,
client: &mut Object,
organization_id: Id<Organization>,
created_by: Id<User>,
style_ref: &Ref<Style>,
style: CreateStyle
) -> Result<(bool, Style)>
pub async fn upsert(
&self,
client: &mut Object,
organization_id: Id<Organization>,
created_by: Id<User>,
style_ref: &Ref<Style>,
style: CreateStyle
) -> Result<(bool, Style)>
Either create or update the given entity, depending on if the style reference can be found
sourcepub async fn delete(
&self,
client: &impl GenericClient,
organization_id: Id<Organization>,
ref_: &Ref<Style>
) -> Result<()>
pub async fn delete(
&self,
client: &impl GenericClient,
organization_id: Id<Organization>,
ref_: &Ref<Style>
) -> Result<()>
Delete the given Style
Trait Implementations§
source§impl Clone for StylesRepo
impl Clone for StylesRepo
source§fn clone(&self) -> StylesRepo
fn clone(&self) -> StylesRepo
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 more