pub struct TargetRefusal { /* private fields */ }Expand description
Why an encoder could not resolve or deliver a write target.
The refusal carries the encoder catalog once, beside the request-state reason, so every reason is rendered and reported against the same catalog.
Implementations§
Source§impl TargetRefusal
impl TargetRefusal
Sourcepub fn new(kind: TargetRefusalKind, available: TargetCatalog) -> Self
pub fn new(kind: TargetRefusalKind, available: TargetCatalog) -> Self
Associates one request-state reason with the refusing encoder catalog.
Sourcepub fn unknown_explicit(
requested: impl Into<String>,
available: TargetCatalog,
) -> Self
pub fn unknown_explicit( requested: impl Into<String>, available: TargetCatalog, ) -> Self
Builds the refusal for an explicit token outside an encoder catalog.
Sourcepub const fn available(&self) -> &'static [TargetDescriptor]
pub const fn available(&self) -> &'static [TargetDescriptor]
Returns the encoder’s structured synthesis catalog.
Trait Implementations§
Source§impl Clone for TargetRefusal
impl Clone for TargetRefusal
Source§impl Debug for TargetRefusal
impl Debug for TargetRefusal
Source§impl Display for TargetRefusal
impl Display for TargetRefusal
impl Eq for TargetRefusal
Source§impl Error for TargetRefusal
impl Error for TargetRefusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<TargetRefusal> for CodecError
impl From<TargetRefusal> for CodecError
Source§fn from(refusal: TargetRefusal) -> Self
fn from(refusal: TargetRefusal) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TargetRefusal
impl PartialEq for TargetRefusal
Source§impl Serialize for TargetRefusal
impl Serialize for TargetRefusal
impl StructuralPartialEq for TargetRefusal
Auto Trait Implementations§
impl Freeze for TargetRefusal
impl RefUnwindSafe for TargetRefusal
impl Send for TargetRefusal
impl Sync for TargetRefusal
impl Unpin for TargetRefusal
impl UnsafeUnpin for TargetRefusal
impl UnwindSafe for TargetRefusal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more