#[non_exhaustive]pub enum ObjectType {
Marktlokation,
Messlokation,
Tranche,
Netzlokation,
TechnischeRessource,
SteuerungRessource,
}Expand description
Domain type for BDEW object-type qualifier codes (EDIFACT DE 7495).
Used in UTILMD IDE segments to identify the type of the supply-point object. Prefer this over raw qualifier strings to get compile-time safety and self-documenting code.
§Example
use edi_energy::ObjectType;
let qualifier = ObjectType::Marktlokation.qualifier_code();
assert_eq!(qualifier, "Z18");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Marktlokation
Marktlokation (MaLo) — DE 7495 qualifier "Z18".
A market location is the unit of settlement in the German energy market. It aggregates one or more Messlokationen.
Messlokation
Messlokation (MeLo) — DE 7495 qualifier "Z19".
A measurement location is a physical metering point.
Tranche
Tranche — DE 7495 qualifier "Z30".
A tranche is used for load-profile-based settlement.
Netzlokation
Netzlokation — DE 7495 qualifier "Z31".
A network location for gas market processes.
TechnischeRessource
Technische Ressource — DE 7495 qualifier "Z32".
A technical resource such as a controllable consumer asset.
SteuerungRessource
Steuerbare Ressource — DE 7495 qualifier "ZE7".
A controllable resource identified by Steuerbarer-Ressourcen-ID.
Implementations§
Source§impl ObjectType
impl ObjectType
Sourcepub fn qualifier_code(self) -> &'static str
pub fn qualifier_code(self) -> &'static str
Returns the EDIFACT DE 7495 qualifier code for this object type.
use edi_energy::ObjectType;
assert_eq!(ObjectType::Marktlokation.qualifier_code(), "Z18");
assert_eq!(ObjectType::Messlokation.qualifier_code(), "Z19");
assert_eq!(ObjectType::Tranche.qualifier_code(), "Z30");
assert_eq!(ObjectType::Netzlokation.qualifier_code(), "Z31");
assert_eq!(ObjectType::TechnischeRessource.qualifier_code(), "Z32");
assert_eq!(ObjectType::SteuerungRessource.qualifier_code(), "ZE7");Sourcepub fn from_qualifier_code(code: &str) -> Option<Self>
pub fn from_qualifier_code(code: &str) -> Option<Self>
Attempt to parse an ObjectType from a raw qualifier code string.
Returns None for unknown or extension codes.
use edi_energy::ObjectType;
assert_eq!(ObjectType::from_qualifier_code("Z18"), Some(ObjectType::Marktlokation));
assert_eq!(ObjectType::from_qualifier_code("Z99"), None);Trait Implementations§
Source§impl Clone for ObjectType
impl Clone for ObjectType
Source§fn clone(&self) -> ObjectType
fn clone(&self) -> ObjectType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ObjectType
Source§impl Debug for ObjectType
impl Debug for ObjectType
Source§impl Display for ObjectType
impl Display for ObjectType
impl Eq for ObjectType
Source§impl From<ObjectType> for String
impl From<ObjectType> for String
Source§fn from(ot: ObjectType) -> String
fn from(ot: ObjectType) -> String
Source§impl Hash for ObjectType
impl Hash for ObjectType
Source§impl PartialEq for ObjectType
impl PartialEq for ObjectType
impl StructuralPartialEq for ObjectType
Auto Trait Implementations§
impl Freeze for ObjectType
impl RefUnwindSafe for ObjectType
impl Send for ObjectType
impl Sync for ObjectType
impl Unpin for ObjectType
impl UnsafeUnpin for ObjectType
impl UnwindSafe for ObjectType
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.Source§impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
fn validate_matches(&self, other: &O) -> bool
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more