Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 18 variants Transport { source: Error, meta: Meta, }, Moq { source: Error, meta: Meta, }, Fill { source: Arc<AnyError>, meta: Meta, }, Refused { source: Error, meta: Meta, }, Rejected { source: Rejection, meta: Meta, }, SessionClosed { source: Error, meta: Meta, }, Duplicate { path: Path, meta: Meta, }, InvalidPath { path: String, meta: Meta, }, NotGranted { path: Path, peer: EndpointId, publish_prefixes: Prefixes, meta: Meta, }, NotOwner { path: Path, peer: EndpointId, meta: Meta, }, TooManyClaims { peer: EndpointId, meta: Meta, }, NotAnnounced { path: Path, meta: Meta, }, NoRoute { path: Path, meta: Meta, }, Unresolved { path: Path, source: Error, meta: Meta, }, InvalidRelayUrl { url: Box<Url>, reason: &'static str, meta: Meta, }, Relay { source: Arc<AnyError>, meta: Meta, }, InvalidTicket { reason: &'static str, meta: Meta, }, ShutDown { meta: Meta, },
}
Expand description

An error from a Node or one of its handles.

moq-net’s and the transport’s errors stay typed, and the rest carry an AnyError. The error is cheap to clone, so the callers waiting on one dial each get the same failure.

Variants§

§

Transport

The QUIC connection could not be set up.

The peer could not be dialed, or it negotiated an ALPN this build does not speak.

Fields

§source: Error
§meta: Meta

Captured call-site metadata

§

Moq

moq-net refused an operation.

The MoQ handshake or the session failed, a path did not parse, or the route table refused to create or announce a broadcast.

Fields

§source: Error
§meta: Meta

Captured call-site metadata

§

Fill

The fill passed to Node::publish_with failed.

The broadcast was closed and never announced.

Fields

§source: Arc<AnyError>
§meta: Meta

Captured call-site metadata

§

Refused

The peer refused the session this node opened.

Fields

§source: Error
§meta: Meta

Captured call-site metadata

§

Rejected

This node’s policy rejected the peer.

A dial fails with it before it reaches the peer.

Fields

§source: Rejection
§meta: Meta

Captured call-site metadata

§

SessionClosed

The session ended.

Fields

§source: Error

Is moq_net::Error::Cancel if either side closed it.

§meta: Meta

Captured call-site metadata

§

Duplicate

A publication already exists at this path.

Fields

§path: Path
§meta: Meta

Captured call-site metadata

§

InvalidPath

The path cannot be published or subscribed.

It is empty, holds a *, or has more segments than a path may have.

Fields

§path: String
§meta: Meta

Captured call-site metadata

§

NotGranted

The session’s grant does not cover the path.

For a subscribe, the peer may not publish the path. publish_prefixes are the prefixes the grant lets the peer publish.

Fields

§path: Path
§publish_prefixes: Prefixes
§meta: Meta

Captured call-site metadata

§

NotOwner

The peer does not own the path, so it cannot be claimed for the peer.

Fields

§path: Path
§meta: Meta

Captured call-site metadata

§

TooManyClaims

The peer already holds as many claimed paths as the node allows.

Fields

§meta: Meta

Captured call-site metadata

§

NotAnnounced

The path was not announced before its only link went away.

Fields

§path: Path
§meta: Meta

Captured call-site metadata

§

NoRoute

No link can serve the path.

The reach asks for media relays and none is attached, or names this node as the publisher of a path it does not publish.

Fields

§path: Path
§meta: Meta

Captured call-site metadata

§

Unresolved

The path could not be resolved.

The peer refused it, or it lies outside what this node may see.

Fields

§path: Path
§source: Error
§meta: Meta

Captured call-site metadata

§

InvalidRelayUrl

A media relay URL names no media relay this node can attach to.

Fields

§url: Box<Url>
§reason: &'static str
§meta: Meta

Captured call-site metadata

§

Relay

A relay link could not be set up.

Fields

§source: Arc<AnyError>
§meta: Meta

Captured call-site metadata

§

InvalidTicket

A string is not a BroadcastTicket.

Fields

§reason: &'static str
§meta: Meta

Captured call-site metadata

§

ShutDown

The node has shut down.

Fields

§meta: Meta

Captured call-site metadata

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Self

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 Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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 From<Error> for AnyError

Source§

fn from(value: Error) -> AnyError

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl StackError for Error

Source§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
Source§

fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
Source§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
Source§

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

Returns the next source in the chain, if any.
Source§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
Source§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
Source§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
Source§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an ErrorRef. Read more
Source§

fn stack(&self) -> Chain<'_> ⓘ

Returns an iterator over this error followed by its sources.
Source§

fn sources(&self) -> Chain<'_> ⓘ

Returns an iterator over sources of this error (skipping self).
Source§

fn report(&self) -> Report<'_>

Returns a Report to output the error with configurable formatting.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StackErrorExt for T
where T: StackError + 'static,

Source§

fn into_any(self) -> AnyError

Converts the error into AnyError. Read more
Source§

fn context(self, context: impl Display) -> AnyError

Converts the error into AnyError, and adds additional error context.
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more