pub enum Address {
Http(String),
File(String),
Data(String),
Clip(String),
Directory(String),
Custom(String),
}Expand description
Typed address carrying both the scheme classification and the raw URL string.
Replaces the two-field stopgap of url: String + AddressKind. The raw
URL string is always recoverable via Address::as_url_str. Structured
parsing (hostname extraction, path manipulation) continues to happen at the
render/utility layer via cached_host_from_url and host-side address utilities.
Uses String payloads rather than url::Url / PathBuf so the type
remains rkyv-serializable and WASM-clean without pulling parser
dependencies into the graph model layer.
Variants§
Http(String)
HTTP or HTTPS content URL.
File(String)
Local filesystem file (file:// URL, non-directory).
Data(String)
Inline data URL payload (data: scheme).
Clip(String)
Graphshell clip route (verso://clip/<id> or graphshell://clip/<id>).
The payload is the clip id, not the full URL.
Directory(String)
Local filesystem directory path (file:// URL ending with /).
Custom(String)
Any other or unresolved scheme — stores the raw URL.
Implementations§
Source§impl Address
impl Address
Sourcepub fn as_url_str(&self) -> &str
pub fn as_url_str(&self) -> &str
Return the raw URL string for this address.
Sourcepub fn address_kind(&self) -> AddressKind
pub fn address_kind(&self) -> AddressKind
Derive the legacy AddressKind from this address.
Provided as a bridge accessor during the migration so callers that
still pattern-match on AddressKind continue to compile unchanged.
Trait Implementations§
Source§impl Archive for Address
impl Archive for Address
Source§type Archived = ArchivedAddress
type Archived = ArchivedAddress
Source§type Resolver = AddressResolver
type Resolver = AddressResolver
Source§fn resolve(
&self,
resolver: <Self as Archive>::Resolver,
out: Place<<Self as Archive>::Archived>,
)
fn resolve( &self, resolver: <Self as Archive>::Resolver, out: Place<<Self as Archive>::Archived>, )
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize. Read moreSource§impl ContainerAddress for Address
impl ContainerAddress for Address
Source§fn to_address(&self) -> Address
fn to_address(&self) -> Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.