#[non_exhaustive]pub enum DefinedType {
Show 28 variants
Figure,
Dataset,
Media,
Poster,
JournalContribution,
Presentation,
Thesis,
Software,
OnlineResource,
Preprint,
Book,
ConferenceContribution,
Chapter,
PeerReview,
EducationalResource,
Report,
Standard,
Composition,
Funding,
PhysicalObject,
DataManagementPlan,
Workflow,
Monograph,
Performance,
Event,
Service,
Model,
Unknown(String),
}Expand description
Typed article kind used by Figshare payloads and search filters.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Figure
Figure.
Dataset
Dataset.
Media
Media.
Poster
Poster.
JournalContribution
Journal contribution.
Presentation
Presentation.
Thesis
Thesis.
Software
Software.
OnlineResource
Online resource.
Preprint
Preprint.
Book
Book.
ConferenceContribution
Conference contribution.
Chapter
Chapter.
PeerReview
Peer review.
EducationalResource
Educational resource.
Report
Report.
Standard
Standard.
Composition
Composition.
Funding
Funding.
PhysicalObject
Physical object.
DataManagementPlan
Data management plan.
Workflow
Workflow.
Monograph
Monograph.
Performance
Performance.
Event
Event.
Service
Service.
Model
Model.
Unknown(String)
Unknown server value preserved as-is.
Implementations§
Source§impl DefinedType
impl DefinedType
Sourcepub fn api_name(&self) -> &str
pub fn api_name(&self) -> &str
Returns the string form used by create and update payloads.
§Examples
use figshare_rs::DefinedType;
assert_eq!(DefinedType::Software.api_name(), "software");
assert_eq!(
DefinedType::JournalContribution.api_name(),
"journal contribution"
);Sourcepub fn api_id(&self) -> Option<u64>
pub fn api_id(&self) -> Option<u64>
Returns the numeric form used by some list/search filters and presenters.
Sourcepub fn from_api_id(id: u64) -> Self
pub fn from_api_id(id: u64) -> Self
Converts the integer representation used by presenter payloads into a
typed DefinedType.
Sourcepub fn from_api_name(value: impl Into<String>) -> Self
pub fn from_api_name(value: impl Into<String>) -> Self
Converts the string representation used by create/update payloads into a
typed DefinedType.
Trait Implementations§
Source§impl Clone for DefinedType
impl Clone for DefinedType
Source§fn clone(&self) -> DefinedType
fn clone(&self) -> DefinedType
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 DefinedType
impl Debug for DefinedType
Source§impl<'de> Deserialize<'de> for DefinedType
impl<'de> Deserialize<'de> for DefinedType
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
Source§impl Hash for DefinedType
impl Hash for DefinedType
Source§impl PartialEq for DefinedType
impl PartialEq for DefinedType
Source§impl Serialize for DefinedType
impl Serialize for DefinedType
impl Eq for DefinedType
impl StructuralPartialEq for DefinedType
Auto Trait Implementations§
impl Freeze for DefinedType
impl RefUnwindSafe for DefinedType
impl Send for DefinedType
impl Sync for DefinedType
impl Unpin for DefinedType
impl UnsafeUnpin for DefinedType
impl UnwindSafe for DefinedType
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