pub struct McpConfigSnippet {
pub title: String,
pub content: String,
pub content_html: String,
}Expand description
单个客户端配置片段:标题 + 原始文本(供复制)+ syntect 高亮 HTML(供展示)。
高亮 HTML 由 crate::highlight::server::highlight_code 生成(spaced CSS class 风格,
配合 public/highlight.css);前端需将其置于 .md-content pre code 作用域下,
否则高亮 CSS 选择器不匹配(见 src/bin/generate_highlight_css.rs 的 base 重写)。
Fields§
§title: String显示标题(含客户端名与目标文件路径)。
content: String原始配置文本(供「复制」按钮复制,未高亮)。
content_html: Stringsyntect 高亮后的 HTML(<span> 序列,无 <pre>/<code> 外壳)。
Trait Implementations§
Source§impl Clone for McpConfigSnippet
impl Clone for McpConfigSnippet
Source§fn clone(&self) -> McpConfigSnippet
fn clone(&self) -> McpConfigSnippet
Returns a duplicate of the value. Read more
1.0.0 · 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 McpConfigSnippet
impl Debug for McpConfigSnippet
Source§impl<'de> Deserialize<'de> for McpConfigSnippet
impl<'de> Deserialize<'de> for McpConfigSnippet
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 McpConfigSnippet
impl PartialEq for McpConfigSnippet
Source§impl Serialize for McpConfigSnippet
impl Serialize for McpConfigSnippet
impl StructuralPartialEq for McpConfigSnippet
Auto Trait Implementations§
impl Freeze for McpConfigSnippet
impl RefUnwindSafe for McpConfigSnippet
impl Send for McpConfigSnippet
impl Sync for McpConfigSnippet
impl Unpin for McpConfigSnippet
impl UnsafeUnpin for McpConfigSnippet
impl UnwindSafe for McpConfigSnippet
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,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.
§impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
§fn transport_to_bytes(&self) -> Vec<u8> ⓘ
fn transport_to_bytes(&self) -> Vec<u8> ⓘ
Serialize the type to a byte vector for transport
§fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
Deserialize the type from a byte slice