#[non_exhaustive]pub enum Bridge {
Passthrough,
Upgrade,
Downgrade,
Unsupported,
}hub only.Expand description
What a hub must do to a message crossing between two OCPI versions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Passthrough
Both sides speak the same version; forward the bytes unchanged.
This is the fast path, and the one that cannot lose anything.
Upgrade
The receiver speaks a newer version; upgrade.
Downgrade
The receiver speaks an older version; downgrade, and report what did not fit.
Unsupported
This build has no conversions between the two versions, so nothing can be translated.
Today that is any crossing involving OCPI 2.1.1 — which has no owner fields, no routing
and no Price, so carrying an object across it is a decision about the deployment rather
than a translation — or a version this crate does not model at all.
Relaying the bytes unchanged is still an option, and for two parties that understand each
other by some arrangement outside this crate it is the right one; the decision belongs to
the operator, so Forwarder takes it as Unbridgeable rather than assuming.
Trait Implementations§
impl Copy for Bridge
impl Eq for Bridge
impl StructuralPartialEq for Bridge
Auto Trait Implementations§
impl Freeze for Bridge
impl RefUnwindSafe for Bridge
impl Send for Bridge
impl Sync for Bridge
impl Unpin for Bridge
impl UnsafeUnpin for Bridge
impl UnwindSafe for Bridge
Blanket Implementations§
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.