pub enum HostingSuccess {
Success,
HostAlreadyInitialized,
DifferentRuntimeProperties,
Unknown(u32),
}Expand description
Success codes returned by the hosting APIs from hostfxr, hostpolicy and nethost.
Source: https://github.com/dotnet/runtime/blob/main/docs/design/features/host-error-codes.md
Variants§
Success
Operation was successful.
HostAlreadyInitialized
Initialization was successful, but another host context is already initialized, so the returned context is “secondary”.
The requested context was otherwise fully compatible with the already initialized context.
This is returned by hostfxr_initialize_for_runtime_config if it’s called when the host is already initialized in the process.
Comes from corehost_initialize in hostpolicy.
DifferentRuntimeProperties
Initialization was successful, but another host context is already initialized and the requested context specified some runtime properties which are not the same (either in value or in presence) to the already initialized context.
This is returned by hostfxr_initialize_for_runtime_config if it’s called when the host is already initialized in the process.
Comes from corehost_initialize in hostpolicy.
Unknown(u32)
Unknown success status code.
Implementations§
Source§impl HostingSuccess
impl HostingSuccess
Sourcepub const fn from_status_code(code: u32) -> Self
pub const fn from_status_code(code: u32) -> Self
Creates a new HostingSuccess from the raw status code.
Sourcepub const fn known_from_status_code(code: u32) -> Result<Self, u32>
pub const fn known_from_status_code(code: u32) -> Result<Self, u32>
Tries to create a new HostingSuccess from the raw status code if it is known.
Otherwise returns the given value as an Err.
Sourcepub const fn is_known(&self) -> bool
pub const fn is_known(&self) -> bool
Returns whether the status code of this success has a known meaning.
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns whether the status code of this success has a unknown meaning.
Trait Implementations§
Source§impl Clone for HostingSuccess
impl Clone for HostingSuccess
Source§fn clone(&self) -> HostingSuccess
fn clone(&self) -> HostingSuccess
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more