pub mod errors; pub mod mandates; pub mod payments; #[derive(Clone, Debug, Eq, PartialEq)] pub enum RemoteStorageObject { ForeignID(String), Object(T), } impl From for RemoteStorageObject { fn from(value: T) -> Self { Self::Object(value) } } pub trait ForeignIDRef { fn foreign_id(&self) -> String; } impl RemoteStorageObject { pub fn get_id(&self) -> String { match self { Self::ForeignID(id) => id.clone(), Self::Object(i) => i.foreign_id(), } } }