pub struct ResourceType {
pub name: String,
pub iri: String,
pub label: Option<String>,
pub is_builtin: bool,
}Expand description
A resource-type as shown by dsp vre resource-type list — the list projection.
Contrast ResourceTypeSummary (the lean describe-child inside DataModelDetail,
which has no is_builtin concept because data-model describe only ever shows a
project ontology’s own classes). This type adds is_builtin so the list command
can mix project-defined and platform built-in resource-types (Region, AudioSegment,
VideoSegment, LinkObj) when --include-builtins is supplied, and callers can
discriminate the two kinds. name is derived from the IRI fragment at the client
boundary — not a wire field. No serde derive: wire deserialization stays in
src/client/http.rs. See ADR-0001 / ADR-0008 and the CONTEXT.md “Resource Type” /
“Built-in” entries.
Fields§
§name: StringShort name of the resource-type (e.g. letter), derived from the IRI fragment.
iri: StringFull IRI of the resource-type
(project: http://api.dasch.swiss/ontology/0801/beol/v2#letter;
built-in: http://api.knora.org/ontology/knora-api/v2#Region).
label: Option<String>Server-supplied human label (rdfs:label), if any. All 4 platform built-ins
carry labels (Region, Audio Annotation, Video Annotation, Link Object).
is_builtin: booltrue for platform built-ins (knora-api: Region, AudioSegment, VideoSegment,
LinkObj); false for project-defined resource-types.
Trait Implementations§
Source§impl Clone for ResourceType
impl Clone for ResourceType
Source§fn clone(&self) -> ResourceType
fn clone(&self) -> ResourceType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourceType
impl Debug for ResourceType
impl Eq for ResourceType
Source§impl PartialEq for ResourceType
impl PartialEq for ResourceType
impl StructuralPartialEq for ResourceType
Auto Trait Implementations§
impl Freeze for ResourceType
impl RefUnwindSafe for ResourceType
impl Send for ResourceType
impl Sync for ResourceType
impl Unpin for ResourceType
impl UnsafeUnpin for ResourceType
impl UnwindSafe for ResourceType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.