pub enum AttachmentFormat {
Mermaid,
PlantUml,
Png,
Svg,
}Variants§
Implementations§
Source§impl AttachmentFormat
impl AttachmentFormat
Sourcepub fn is_text_based(&self) -> bool
pub fn is_text_based(&self) -> bool
Whether this format is text-based (can be inlined into prompts).
Sourcepub fn from_extension(ext: &str) -> Option<Self>
pub fn from_extension(ext: &str) -> Option<Self>
Detect format from file extension.
Sourcepub fn fence_lang(&self) -> &str
pub fn fence_lang(&self) -> &str
The markdown code fence language tag for text-based formats.
Trait Implementations§
Source§impl Clone for AttachmentFormat
impl Clone for AttachmentFormat
Source§fn clone(&self) -> AttachmentFormat
fn clone(&self) -> AttachmentFormat
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 AttachmentFormat
impl Debug for AttachmentFormat
Source§impl<'de> Deserialize<'de> for AttachmentFormat
impl<'de> Deserialize<'de> for AttachmentFormat
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 PartialEq for AttachmentFormat
impl PartialEq for AttachmentFormat
Source§fn eq(&self, other: &AttachmentFormat) -> bool
fn eq(&self, other: &AttachmentFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AttachmentFormat
impl Serialize for AttachmentFormat
impl StructuralPartialEq for AttachmentFormat
Auto Trait Implementations§
impl Freeze for AttachmentFormat
impl RefUnwindSafe for AttachmentFormat
impl Send for AttachmentFormat
impl Sync for AttachmentFormat
impl Unpin for AttachmentFormat
impl UnsafeUnpin for AttachmentFormat
impl UnwindSafe for AttachmentFormat
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