Skip to repository content26 lines · 627 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T02:35:15.150Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
shared_uri.rs
1use derive_more::{Deref, DerefMut};
2
3use crate::SharedString;
4
5/// A [`SharedString`] containing a URI.
6#[derive(Deref, DerefMut, Default, PartialEq, Eq, Hash, Clone)]
7pub struct SharedUri(SharedString);
8
9impl std::fmt::Debug for SharedUri {
10 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11 self.0.fmt(f)
12 }
13}
14
15impl std::fmt::Display for SharedUri {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 write!(f, "{}", self.0.as_ref())
18 }
19}
20
21impl<T: Into<SharedString>> From<T> for SharedUri {
22 fn from(value: T) -> Self {
23 Self(value.into())
24 }
25}
26