pub struct RefusedView {
pub endpoint: String,
pub direction: String,
pub runtime: Option<String>,
pub refusal: LinkRefusal,
pub at: String,
}Expand description
A candidate that was refused, with the rule that refused it. A refusal is kept and shown rather than logged and dropped, because the commonest mesh failure is a link that never forms: a person who declared a seed and sees no peer needs the decision that was made about it — the wrong repository, a key nobody allowed, a clock too far out — and the direction says which side made it.
a.dial(&["s:1".into()]).expect_err("reachable, and not trusted");
let refused: &RefusedView = &strict.status().refused[0];
assert_eq!(refused.refusal.code, RefusalCode::Untrusted);
assert_eq!(refused.direction, "inbound", "this runtime refused the hello");
assert_eq!(refused.runtime.as_deref(), Some(a.runtime_key()));Fields§
§endpoint: StringThe endpoint dialed, or inbound:<runtime> for a refused hello.
direction: Stringoutbound (this runtime refused the peer’s welcome, or the peer refused this
hello) or inbound (this runtime refused the peer’s hello).
runtime: Option<String>The peer’s runtime key, when its card said.
refusal: LinkRefusalThe refusal.
at: StringWhen, RFC 3339.
Trait Implementations§
Source§impl Clone for RefusedView
impl Clone for RefusedView
Source§fn clone(&self) -> RefusedView
fn clone(&self) -> RefusedView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RefusedView
impl Debug for RefusedView
Source§impl<'de> Deserialize<'de> for RefusedView
impl<'de> Deserialize<'de> for RefusedView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for RefusedView
impl JsonSchema for RefusedView
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for RefusedView
impl RefUnwindSafe for RefusedView
impl Send for RefusedView
impl Sync for RefusedView
impl Unpin for RefusedView
impl UnsafeUnpin for RefusedView
impl UnwindSafe for RefusedView
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