pub struct ImageRef {
pub source: String,
pub kind: ImageSourceKind,
pub start: usize,
pub end: usize,
}Expand description
Parse [IMAGE:<source>] markers from user messages.
Supported source formats:
[IMAGE:/path/to/file.png]— local file path[IMAGE:data:image/png;base64,...]— data URI[IMAGE:https://example.com/image.png]— remote URL (requires allow_remote_fetch)
A parsed image reference extracted from a message.
Fields§
§source: StringThe source string (file path, data URI, or URL).
kind: ImageSourceKindWhat kind of source this is.
start: usizeByte offset in the original message where the marker starts.
end: usizeByte offset in the original message where the marker ends.
Trait Implementations§
impl Eq for ImageRef
impl StructuralPartialEq for ImageRef
Auto Trait Implementations§
impl Freeze for ImageRef
impl RefUnwindSafe for ImageRef
impl Send for ImageRef
impl Sync for ImageRef
impl Unpin for ImageRef
impl UnsafeUnpin for ImageRef
impl UnwindSafe for ImageRef
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.