#[non_exhaustive]pub enum BoTyp {
Show 39 variants
Angebot,
Ausschreibung,
Bilanzierung,
Buendelvertrag,
Energiemenge,
Fremdkosten,
Geraet,
Geschaeftsobjekt,
Geschaeftspartner,
Kosten,
Lastgang,
Marktlokation,
Messlokation,
Netzlokation,
Marktteilnehmer,
Netznutzungsrechnung,
TechnischeRessource,
SteuerbareRessource,
Person,
Preisblatt,
PreisblattDienstleistung,
PreisblattHardware,
PreisblattKonzessionsabgabe,
PreisblattMessung,
PreisblattNetznutzung,
Preisblattumlagen,
Rechnung,
Region,
Standorteigenschaften,
Tarif,
Tarifinfo,
Tarifkosten,
Tarifpreisblatt,
Vertrag,
Zaehler,
Zaehlzeitdefinition,
Zeitreihe,
Lokationszuordnung,
Unknown,
}versioned and (crate features json or versioned) only.Expand description
Auflistung sämtlicher existierender Geschäftsobjekte.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Angebot
Ausschreibung
Bilanzierung
Buendelvertrag
Energiemenge
Fremdkosten
Geraet
Geschaeftsobjekt
Geschaeftspartner
Kosten
Lastgang
Marktlokation
Messlokation
Netzlokation
Marktteilnehmer
Netznutzungsrechnung
TechnischeRessource
SteuerbareRessource
Person
Preisblatt
PreisblattDienstleistung
PreisblattHardware
PreisblattKonzessionsabgabe
PreisblattMessung
PreisblattNetznutzung
Preisblattumlagen
Rechnung
Region
Standorteigenschaften
Tarif
Tarifinfo
Tarifkosten
Tarifpreisblatt
Vertrag
Zaehler
Zaehlzeitdefinition
Zeitreihe
Lokationszuordnung
Unknown
Unknown or future variant — produced when deserializing a value that is not yet known to this version of the library.
Implementations§
Source§impl BoTyp
impl BoTyp
Sourcepub const VARIANTS: &'static [Self]
pub const VARIANTS: &'static [Self]
All variants defined by the BO4E schema, in declaration order.
Excludes the forward-compatibility BoTyp::Unknown catch-all, so this
is exactly the set of values that appear on the wire. Available without
the strum feature — use it to drift-guard SQL CHECK lists and mappings.
Sourcepub const COUNT: usize
pub const COUNT: usize
Number of schema-defined variants (equal to VARIANTS.len()), excluding the
BoTyp::Unknown catch-all. Stable for this schema version.
Sourcepub fn iter_known() -> impl Iterator<Item = Self> + Clone
pub fn iter_known() -> impl Iterator<Item = Self> + Clone
Returns an iterator over all known variants of BoTyp.
Yields only variants that correspond to values defined in the BO4E schema
(i.e. Self::VARIANTS), never the BoTyp::Unknown catch-all.
Available without the strum feature.
§Example
// Never yields the `Unknown` catch-all, so the count matches `COUNT`.
assert_eq!(BoTyp::iter_known().count(), BoTyp::COUNT);
assert!(BoTyp::iter_known().all(|v| v.is_known()));Sourcepub const fn as_wire(&self) -> &'static str
pub const fn as_wire(&self) -> &'static str
Returns the canonical BO4E wire string (SCREAMING_SNAKE_CASE) for this value.
BoTyp::Unknown renders as "UNKNOWN", matching its serialized form.
Sourcepub fn from_wire(s: &str) -> Result<Self, UnknownVariant>
pub fn from_wire(s: &str) -> Result<Self, UnknownVariant>
Strictly parses a BO4E wire string into a known variant.
Unlike the lenient serde / FromStr path — which maps
any unrecognized value (a typo, a legacy code, or a value from a newer schema)
to BoTyp::Unknown — this returns
Err for values not defined in this schema
version, including the literal "UNKNOWN". Use it at the ingest boundary to
reject bad values instead of silently degrading them.
§Example
assert_eq!(BoTyp::from_wire("ANGEBOT"), Ok(BoTyp::Angebot));
// Out-of-schema values are rejected rather than degraded:
assert!(BoTyp::from_wire("NOT_A_REAL_VALUE").is_err());
// …including the `Unknown` catch-all's own wire spelling:
assert!(BoTyp::from_wire("UNKNOWN").is_err());Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if this value is the forward-compatibility
BoTyp::Unknown catch-all (an out-of-schema value).
Trait Implementations§
Source§impl Bo4eEnum for BoTyp
impl Bo4eEnum for BoTyp
Source§const VARIANTS: &'static [Self] = Self::VARIANTS
const VARIANTS: &'static [Self] = Self::VARIANTS
Source§const COUNT: usize = Self::COUNT
const COUNT: usize = Self::COUNT
VARIANTS.len()), excluding
the Unknown catch-all. Stable for a given schema version — use it to
drift-guard hand-maintained variant counts.Source§fn as_wire(&self) -> &'static str
fn as_wire(&self) -> &'static str
Source§fn is_unknown(&self) -> bool
fn is_unknown(&self) -> bool
true if this value is the forward-compatibility Unknown
catch-all — i.e. an out-of-schema value produced by a lenient decode.Source§impl Bo4eStrict for BoTyp
impl Bo4eStrict for BoTyp
Source§fn collect_unknown_enums(&self, path: &str, out: &mut Vec<String>)
fn collect_unknown_enums(&self, path: &str, out: &mut Vec<String>)
out, the field_path-formatted
location of every enum field in self (recursively) that holds the
forward-compatibility Unknown catch-all. path is the JSON-path of
self relative to the root of the check ("" at the top level). Read moreSource§fn unknown_enum_paths(&self) -> Vec<String>
fn unknown_enum_paths(&self) -> Vec<String>
Unknown. Empty when the value is fully in-schema.Source§fn ensure_known_enums(&self) -> Result<(), StrictError>
fn ensure_known_enums(&self) -> Result<(), StrictError>
Err(StrictError) listing every
out-of-schema (Unknown) enum value in self, or Ok(()) if there are
none. Call this after a lenient serde decode to reject payloads that
carry typos, legacy codes, or values from a newer schema.impl Copy for BoTyp
Source§impl<'r> Decode<'r, Postgres> for BoTyp
Available on crate feature sqlx only.Decodes leniently, matching the serde path: a value the schema does not
define becomes BoTyp::Unknown rather than a decode error, so a
database row written by a newer schema version still reads back.
impl<'r> Decode<'r, Postgres> for BoTyp
sqlx only.Decodes leniently, matching the serde path: a value the schema does not
define becomes BoTyp::Unknown rather than a decode error, so a
database row written by a newer schema version still reads back.
Use BoTyp::from_wire on a String column, or check
BoTyp::is_known, where out-of-schema values must be rejected.
Source§impl<'de> Deserialize<'de> for BoTyp
Available on crate feature serde only.
impl<'de> Deserialize<'de> for BoTyp
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'q> Encode<'q, Postgres> for BoTyp
Available on crate feature sqlx only.Encodes as the canonical BO4E wire string, borrowed from as_wire — no
intermediate String or serde_json::Value is allocated.
impl<'q> Encode<'q, Postgres> for BoTyp
sqlx only.Encodes as the canonical BO4E wire string, borrowed from as_wire — no
intermediate String or serde_json::Value is allocated.
Source§fn encode_by_ref(
&self,
buf: &mut <Postgres as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <Postgres as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
self into buf in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl Eq for BoTyp
Source§impl IntoEnumIterator for BoTyp
Available on crate feature strum only.
impl IntoEnumIterator for BoTyp
strum only.Source§impl JsonSchema for BoTyp
Available on crate feature schemars only.
impl JsonSchema for BoTyp
schemars only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for BoTyp
impl Ord for BoTyp
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for BoTyp
impl PartialOrd for BoTyp
Source§impl PgHasArrayType for BoTyp
Available on crate feature sqlx only.Lets Vec<BoTyp> bind to a TEXT[] column. Only this crate can
provide it: the trait and the enum are both foreign to any consumer, so the
orphan rule rules out a downstream impl.
impl PgHasArrayType for BoTyp
sqlx only.Lets Vec<BoTyp> bind to a TEXT[] column. Only this crate can
provide it: the trait and the enum are both foreign to any consumer, so the
orphan rule rules out a downstream impl.
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
impl StructuralPartialEq for BoTyp
Auto Trait Implementations§
impl Freeze for BoTyp
impl RefUnwindSafe for BoTyp
impl Send for BoTyp
impl Sync for BoTyp
impl Unpin for BoTyp
impl UnsafeUnpin for BoTyp
impl UnwindSafe for BoTyp
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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> PartialSchema for Twhere
T: ComposeSchema + ?Sized,
impl<T> PartialSchema for Twhere
T: ComposeSchema + ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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