pub struct ContentType {Show 14 fields
pub id: String,
pub name: String,
pub domain: ContentDomain,
pub mime_types: Vec<String>,
pub extensions: Vec<String>,
pub magic_bytes: Vec<String>,
pub diff_strategy: DiffStrategy,
pub merge_strategy: MergeStrategy,
pub storage_tier: StorageTier,
pub lfs_threshold: Option<u64>,
pub metadata_schema: Option<Value>,
pub structural_diff: bool,
pub component_locking: bool,
pub description: String,
}Expand description
A registered content type with domain-specific handling policies
Fields§
§id: StringUnique identifier (e.g. “cad/step”, “eda/kicad-pcb”, “db/sqlite”)
name: StringHuman-readable name
domain: ContentDomainDomain classification
mime_types: Vec<String>MIME type(s) associated with this content type
extensions: Vec<String>File extensions (without dot) that map to this type
magic_bytes: Vec<String>Magic bytes for binary detection (hex-encoded prefixes)
diff_strategy: DiffStrategyRecommended diff strategy
merge_strategy: MergeStrategyRecommended merge strategy
storage_tier: StorageTierStorage tier
lfs_threshold: Option<u64>Maximum inline size (bytes) before promoting to LFS
metadata_schema: Option<Value>Metadata schema — JSON Schema fragment describing domain-specific fields
structural_diff: boolWhether this type supports structural diffing natively
component_locking: boolWhether this type supports component-level locking
description: StringDescription
Trait Implementations§
Source§impl Clone for ContentType
impl Clone for ContentType
Source§fn clone(&self) -> ContentType
fn clone(&self) -> ContentType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContentType
impl Debug for ContentType
Source§impl<'de> Deserialize<'de> for ContentType
impl<'de> Deserialize<'de> for ContentType
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 ContentType
impl RefUnwindSafe for ContentType
impl Send for ContentType
impl Sync for ContentType
impl Unpin for ContentType
impl UnsafeUnpin for ContentType
impl UnwindSafe for ContentType
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