MCPcopy Create free account
hub / github.com/evilsocket/cake / fmt

Method fmt

cake-core/src/models/chat.rs:16–26  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

14
15impl std::fmt::Display for MessageRole {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 write!(
18 f,
19 "{}",
20 match self {
21 MessageRole::System => "system",
22 MessageRole::User => "user",
23 MessageRole::Assistant => "assistant",
24 }
25 )
26 }
27}
28
29/// A chat message.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected