pub struct EditOptions {
pub item_id: String,
pub name: Option<String>,
pub description: Option<String>,
pub refines: Option<Vec<String>>,
pub derives_from: Option<Vec<String>>,
pub satisfies: Option<Vec<String>>,
pub specification: Option<String>,
pub platform: Option<String>,
}Expand description
Options for editing an item.
Fields§
§item_id: StringThe item ID to edit.
name: Option<String>New name (if provided).
description: Option<String>New description (if provided).
refines: Option<Vec<String>>New refines references (if provided).
derives_from: Option<Vec<String>>New derives_from references (if provided).
satisfies: Option<Vec<String>>New satisfies references (if provided).
specification: Option<String>New specification (if provided).
platform: Option<String>New platform (if provided).
Implementations§
Source§impl EditOptions
impl EditOptions
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub fn with_refines(self, refines: Vec<String>) -> Self
pub fn with_refines(self, refines: Vec<String>) -> Self
Sets the refines references.
Sourcepub fn with_derives_from(self, derives_from: Vec<String>) -> Self
pub fn with_derives_from(self, derives_from: Vec<String>) -> Self
Sets the derives_from references.
Sourcepub fn with_satisfies(self, satisfies: Vec<String>) -> Self
pub fn with_satisfies(self, satisfies: Vec<String>) -> Self
Sets the satisfies references.
Sourcepub fn with_specification(self, specification: impl Into<String>) -> Self
pub fn with_specification(self, specification: impl Into<String>) -> Self
Sets the specification.
Sourcepub fn with_platform(self, platform: impl Into<String>) -> Self
pub fn with_platform(self, platform: impl Into<String>) -> Self
Sets the platform.
Sourcepub fn has_updates(&self) -> bool
pub fn has_updates(&self) -> bool
Returns true if any modification was requested.
Trait Implementations§
Source§impl Clone for EditOptions
impl Clone for EditOptions
Source§fn clone(&self) -> EditOptions
fn clone(&self) -> EditOptions
Returns a duplicate 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 EditOptions
impl Debug for EditOptions
Source§impl Default for EditOptions
impl Default for EditOptions
Source§fn default() -> EditOptions
fn default() -> EditOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EditOptions
impl RefUnwindSafe for EditOptions
impl Send for EditOptions
impl Sync for EditOptions
impl Unpin for EditOptions
impl UnwindSafe for EditOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more