A small tool to view real-world ActivityPub objects as JSON! Enter a URL
or username from Mastodon or a similar service below, and we'll send a
request with
the right
Accept
header
to the server to view the underlying object.
{
"@context": [
"https://join-lemmy.org/context.json",
"https://www.w3.org/ns/activitystreams"
],
"type": "Page",
"id": "https://lemm.ee/post/47019932",
"attributedTo": "https://lemm.ee/u/Cpo",
"to": [
"https://programming.dev/c/rust",
"https://www.w3.org/ns/activitystreams#Public"
],
"name": "sqlx::Transaction and Arc<Mutex<Transaction>>",
"cc": [],
"content": "<p>In order to share the running transaction into a DAO style data management class, I have wrapped the transaction in an Arc<Mutex> and pass it into the DAO.</p>\n<p>The issue is, once the transaction is in there I cannot call commit() on it because it cannot be moved out of the Arc<Mutex> anymore, as the commit requires a mut self.</p>\n<p>Any ideas on how to work around this?</p>\n",
"mediaType": "text/html",
"source": {
"content": "In order to share the running transaction into a DAO style data management class, I have wrapped the transaction in an Arc<Mutex> and pass it into the DAO.\n\nThe issue is, once the transaction is in there I cannot call commit() on it because it cannot be moved out of the Arc<Mutex> anymore, as the commit requires a mut self.\n\nAny ideas on how to work around this?",
"mediaType": "text/markdown"
},
"attachment": [],
"sensitive": false,
"published": "2024-11-10T10:26:51.441265Z",
"audience": "https://programming.dev/c/rust",
"tag": [
{
"href": "https://lemm.ee/post/47019932",
"name": "#rust",
"type": "Hashtag"
}
]
}