pub struct SchemaSyntax(/* private fields */);Expand description
The schema as string in the syntax defined in the field type.
Failure to respect the syntax will fail any operation on an EventType.
Implementations§
Source§impl SchemaSyntax
impl SchemaSyntax
Source§impl SchemaSyntax
impl SchemaSyntax
Sourcepub const ENV_TYPE_NAME: &'static str
pub const ENV_TYPE_NAME: &'static str
The default name of the environment variable for this type.
The name of the environment variable is “ EVENT_TYPE_SCHEMA_SYNTAX “
Sourcepub fn try_from_env() -> Result<Option<Self>, Error>
pub fn try_from_env() -> Result<Option<Self>, Error>
Initialize from the environment.
Returns None if the value was not found and fails if the value could not be parsed.
The name of the environment variable is “NAKADION_
EVENT_TYPE_SCHEMA_SYNTAX
“
Sourcepub fn try_from_env_prefixed<T: Into<String>>(
prefix: T,
) -> Result<Option<Self>, Error>
pub fn try_from_env_prefixed<T: Into<String>>( prefix: T, ) -> Result<Option<Self>, Error>
Initialize from the environment.
Returns None if the value was not found and fails if the value could not be parsed.
The name of the environment variable is “prefix_
EVENT_TYPE_SCHEMA_SYNTAX
“
The underscore and prefix will be omitted if prefix is empty.
Sourcepub fn try_from_env_named<T: AsRef<str>>(
var_name: T,
) -> Result<Option<Self>, Error>
pub fn try_from_env_named<T: AsRef<str>>( var_name: T, ) -> Result<Option<Self>, Error>
Initialize from the environment.
Returns None if the value was not found and fails if the value could not be parsed.
The name of the environment variable is var_name.
Sourcepub fn try_from_env_type_name() -> Result<Option<Self>, Error>
pub fn try_from_env_type_name() -> Result<Option<Self>, Error>
Initialize from the environment.
Returns None if the value was not found and fails if the value could not be parsed.
The name of the environment variable is “
EVENT_TYPE_SCHEMA_SYNTAX
“
Sourcepub fn from_env() -> Result<Self, Error>
pub fn from_env() -> Result<Self, Error>
Initialize from the environment. Fails if the value was not found or if the value could not be parsed. The name of the environment variable is “NAKADION_ EVENT_TYPE_SCHEMA_SYNTAX “
Sourcepub fn from_env_prefixed<T: Into<String>>(prefix: T) -> Result<Self, Error>
pub fn from_env_prefixed<T: Into<String>>(prefix: T) -> Result<Self, Error>
Initialize from the environment.
Fails if the value was not found or if the value could not be parsed.
The name of the environment variable is “prefix_
EVENT_TYPE_SCHEMA_SYNTAX
“
The underscore and prefix will be omitted if prefix is empty.
Sourcepub fn from_env_named<T: AsRef<str>>(var_name: T) -> Result<Self, Error>
pub fn from_env_named<T: AsRef<str>>(var_name: T) -> Result<Self, Error>
Initialize from the environment.
Fails if the value was not found or if the value could not be parsed.
The name of the environment variable is var_name.
Sourcepub fn from_env_type_name() -> Result<Self, Error>
pub fn from_env_type_name() -> Result<Self, Error>
Initialize from the environment. Fails if the value was not found or if the value could not be parsed. The name of the environment variable is “ EVENT_TYPE_SCHEMA_SYNTAX “
Sourcepub fn from_env_opt() -> Option<Self>
pub fn from_env_opt() -> Option<Self>
Initialize from the environment.
Returns None if the value could not be read for any reason.
The name of the environment variable is “NAKADION_
EVENT_TYPE_SCHEMA_SYNTAX
“
Sourcepub fn from_env_opt_prefixed<T: Into<String>>(prefix: T) -> Option<Self>
pub fn from_env_opt_prefixed<T: Into<String>>(prefix: T) -> Option<Self>
Initialize from the environment.
Returns None if the value could not be read for any reason.
The name of the environment variable is “prefix_
EVENT_TYPE_SCHEMA_SYNTAX
“
The underscore and prefix will be omitted if prefix is empty.
Sourcepub fn from_env_opt_named<T: AsRef<str>>(var_name: T) -> Option<Self>
pub fn from_env_opt_named<T: AsRef<str>>(var_name: T) -> Option<Self>
Initialize from the environment.
Returns None if the value could not be read for any reason.
The name of the environment variable is var_name.
Sourcepub fn from_env_opt_type_name() -> Option<Self>
pub fn from_env_opt_type_name() -> Option<Self>
Initialize from the environment.
Returns None if the value could not be read for any reason.
The name of the environment variable is “
EVENT_TYPE_SCHEMA_SYNTAX
“