pub struct Extension {
pub id: String,
pub version: String,
pub required: bool,
}Expand description
Extension declaration.
Fields§
§id: StringExtension identifier (e.g., “codex.semantic”, “codex.legal”).
version: StringExtension version.
required: boolWhether extension is required for correct rendering.
If true, readers that don’t support this extension should fail.
If false, readers may render fallback content or skip extension blocks.
Implementations§
Source§impl Extension
impl Extension
Sourcepub fn new(
id: impl Into<String>,
version: impl Into<String>,
required: bool,
) -> Self
pub fn new( id: impl Into<String>, version: impl Into<String>, required: bool, ) -> Self
Create a new extension declaration.
Sourcepub fn required(id: impl Into<String>, version: impl Into<String>) -> Self
pub fn required(id: impl Into<String>, version: impl Into<String>) -> Self
Create a new required extension declaration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Extension
impl<'de> Deserialize<'de> for Extension
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
impl Eq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnsafeUnpin for Extension
impl UnwindSafe for Extension
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<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
Compare self to
key and return true if they are equal.