Skip to main content

InitError

Enum InitError 

Source
pub enum InitError {
    EnvParseFailed,
    DomainIdOutOfRange,
    RetiredEnvVar {
        name: &'static str,
        replacement: &'static str,
    },
    ExecutorOpenFailed(NodeError),
    BackingTooSmall {
        needed: usize,
        given: usize,
    },
}
Expand description

Errors returned by the init API.

Variants§

§

EnvParseFailed

A launch-derived env var (ROS_DOMAIN_ID, etc.) failed to parse — or, freestanding, the baked NROS_DOMAIN_ID is not a decimal integer.

§

DomainIdOutOfRange

A domain id — from the environment, the bake, or an InitOptions::with_domain_id override — exceeds crate::DOMAIN_ID_MAX. Rejected here rather than handed to a backend that can only fail later (the #206 rule).

§

RetiredEnvVar

phase-484 W8c — a RETIRED environment variable is set (ZENOH_LOCATOR, ZENOH_MODE). Refused rather than ignored: an ignored locator dials the default router, which reads as “no delivery”.

Fields

§name: &'static str

The retired name the environment still sets.

§replacement: &'static str

The canonical name to set instead.

§

ExecutorOpenFailed(NodeError)

phase-427 W10 — Context::create_executor / Context::create_executor_in resolved the identity and the RMW session open then failed.

The backend’s own NodeError is CARRIED, not flattened into a flag: Transport(InvalidConfig) (no backend registered, or more than one and no selector) and Transport(ConnectionFailed) (the router is not there) are different problems with different fixes, and issue 0465 is what collapsing them cost the last time.

§

BackingTooSmall

phase-427 W10 — Context::create_executor_in was handed a backing smaller than the executor’s tables need.

Refused rather than accepted: Executor::open_in is unsafe precisely because a short backing is undefined behaviour, so the safe wrapper checks the length and names both numbers. needed is ExecutorSizing::DEFAULT.u64_len() for this build — it moves with NROS_EXECUTOR_MAX_CBS / _MAX_SC / _ARENA_SIZE / _MAX_NODES, so a caller sizing a static from a literal will hear about it here rather than corrupting memory later.

Fields

§needed: usize

u64 words the executor’s tables need.

§given: usize

u64 words the caller supplied.

Trait Implementations§

Source§

impl Clone for InitError

Source§

fn clone(&self) -> InitError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InitError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for InitError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for InitError

Source§

impl Error for InitError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for InitError

Source§

fn eq(&self, other: &InitError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for InitError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.