私のはこんな感じ
mにhandle(user.bsky.social)が入ってる
let e = udid.chars().count();
let s = 0;
if let Ok(post) = c.string_flag("post") {
let post = Some(json!({
"did": did.to_string(),
"collection": col.to_string(),
"record": {
"text": m.to_string() + &" ".to_string() + &post.to_string(),
"createdAt": d.to_string(),
"entities": [
{
"type": "mention".to_string(),
"index": {
"end": e,
"start": s
},
"value": udid.to_string()
}
]
},
}));