Enum netcorehost::error::HostingSuccess
source · 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 moresource§impl Debug for HostingSuccess
impl Debug for HostingSuccess
source§impl Display for HostingSuccess
impl Display for HostingSuccess
source§impl From<HostingSuccess> for HostingResult
impl From<HostingSuccess> for HostingResult
source§fn from(success: HostingSuccess) -> Self
fn from(success: HostingSuccess) -> Self
source§impl From<HostingSuccess> for u32
impl From<HostingSuccess> for u32
source§fn from(code: HostingSuccess) -> Self
fn from(code: HostingSuccess) -> Self
source§impl Hash for HostingSuccess
impl Hash for HostingSuccess
source§impl Ord for HostingSuccess
impl Ord for HostingSuccess
source§fn cmp(&self, other: &HostingSuccess) -> Ordering
fn cmp(&self, other: &HostingSuccess) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for HostingSuccess
impl PartialEq for HostingSuccess
source§fn eq(&self, other: &HostingSuccess) -> bool
fn eq(&self, other: &HostingSuccess) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for HostingSuccess
impl PartialOrd for HostingSuccess
source§fn partial_cmp(&self, other: &HostingSuccess) -> Option<Ordering>
fn partial_cmp(&self, other: &HostingSuccess) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more