pub enum AssetContext {
Issue {
key: String,
},
IssueComment {
key: String,
comment_id: String,
},
MergeRequest {
mr_id: String,
},
MrComment {
mr_id: String,
note_id: String,
},
Chat {
chat_id: String,
message_id: String,
},
KbPage {
page_id: String,
},
}Expand description
Context to which an asset is attached.
Different providers support attachments in different contexts — an issue body, an issue comment, a merge request, etc. This enum captures all the supported targets in a provider-agnostic way.
Variants§
Issue
Attachment on an issue body/description.
IssueComment
Attachment on a comment under an issue.
MergeRequest
Attachment on a merge request / pull request body.
Fields
mr_id: StringMR / PR identifier. Named mr_id for consistency with
AssetContext::MrComment so JSON-wire field names are the
same across both variants.
MrComment
Attachment on a comment/note of a merge request.
Chat
Attachment from a messenger chat (Slack, Telegram, etc.).
KbPage
Attachment from a knowledge base page (Confluence, etc.).
Implementations§
Source§impl AssetContext
impl AssetContext
Sourcepub fn slug(&self) -> String
pub fn slug(&self) -> String
Short colon-separated string for logging and debugging.
Note: The cache directory layout is handled by
devboy_assets::CacheManager::dir_for / path_for — this method
is intentionally not used for on-disk paths.
Examples:
issue:DEV-123mr:42chat:C0123ABC:msg42
Sourcepub fn kind(&self) -> AssetContextKind
pub fn kind(&self) -> AssetContextKind
Kind of the context (category used in enrichment and capabilities).
Trait Implementations§
Source§impl Clone for AssetContext
impl Clone for AssetContext
Source§fn clone(&self) -> AssetContext
fn clone(&self) -> AssetContext
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 AssetContext
impl Debug for AssetContext
Source§impl<'de> Deserialize<'de> for AssetContext
impl<'de> Deserialize<'de> for AssetContext
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>,
Source§impl Hash for AssetContext
impl Hash for AssetContext
Source§impl PartialEq for AssetContext
impl PartialEq for AssetContext
Source§fn eq(&self, other: &AssetContext) -> bool
fn eq(&self, other: &AssetContext) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AssetContext
impl Serialize for AssetContext
impl Eq for AssetContext
impl StructuralPartialEq for AssetContext
Auto Trait Implementations§
impl Freeze for AssetContext
impl RefUnwindSafe for AssetContext
impl Send for AssetContext
impl Sync for AssetContext
impl Unpin for AssetContext
impl UnsafeUnpin for AssetContext
impl UnwindSafe for AssetContext
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.