mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
Feature/remove postgres (#2570)
* wip: move postgres data to patchdb * wip * wip * wip * complete notifications and clean up warnings * fill in user agent * move os tor bindings to single call
This commit is contained in:
@@ -2,6 +2,7 @@ use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use yasi::InternedString;
|
||||
|
||||
use crate::{Id, InvalidId};
|
||||
|
||||
@@ -18,6 +19,16 @@ impl From<Id> for HostId {
|
||||
Self(id)
|
||||
}
|
||||
}
|
||||
impl From<HostId> for Id {
|
||||
fn from(value: HostId) -> Self {
|
||||
value.0
|
||||
}
|
||||
}
|
||||
impl From<HostId> for InternedString {
|
||||
fn from(value: HostId) -> Self {
|
||||
value.0.into()
|
||||
}
|
||||
}
|
||||
impl std::fmt::Display for HostId {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", &self.0)
|
||||
|
||||
@@ -59,6 +59,11 @@ impl TryFrom<&str> for Id {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<Id> for InternedString {
|
||||
fn from(value: Id) -> Self {
|
||||
value.0
|
||||
}
|
||||
}
|
||||
impl std::ops::Deref for Id {
|
||||
type Target = str;
|
||||
fn deref(&self) -> &Self::Target {
|
||||
|
||||
@@ -3,6 +3,7 @@ use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
|
||||
use serde::{Deserialize, Serialize, Serializer};
|
||||
use yasi::InternedString;
|
||||
|
||||
use crate::{Id, InvalidId, SYSTEM_ID};
|
||||
|
||||
@@ -22,6 +23,16 @@ impl From<Id> for PackageId {
|
||||
PackageId(id)
|
||||
}
|
||||
}
|
||||
impl From<PackageId> for Id {
|
||||
fn from(value: PackageId) -> Self {
|
||||
value.0
|
||||
}
|
||||
}
|
||||
impl From<PackageId> for InternedString {
|
||||
fn from(value: PackageId) -> Self {
|
||||
value.0.into()
|
||||
}
|
||||
}
|
||||
impl std::ops::Deref for PackageId {
|
||||
type Target = str;
|
||||
fn deref(&self) -> &Self::Target {
|
||||
|
||||
Reference in New Issue
Block a user