Skip to main content

Journaled

Enum Journaled 

Source
pub enum Journaled<'a> {
Show 21 variants AnnounceHeard { observation: AnnounceObservation<'a>, rate_accounting: AnnounceRateAccounting, }, SelfRatchetRotated { destination: DestinationHash, }, PersistenceFlushed { cause: PersistenceFlushCause, target: PersistenceFlushTarget, }, PersistenceFlushFailed { cause: PersistenceFlushCause, target: PersistenceFlushTarget, }, AnnounceHeldDropped { destination: DestinationHash, source_interface: InterfaceId, cause: HeldDropCause, }, Delivered(Delivery<'a>), CommandSettled { id: CommandId, settlement: Settlement, }, LinkEstablished(LinkEstablished), PeerIdentified { link_id: LinkId, identity: IdentityHash, }, RequestReceived { destination: DestinationHash, link_id: LinkId, request_id: RequestId, requester: Option<IdentityHash>, path_hash: RequestPathHash, requested_at: InstantMillis, rtt: RttMillis, data: &'a [u8], }, ResponseReceived { command_id: CommandId, link_id: LinkId, request_id: RequestId, data: &'a [u8], }, ResponseSegmentReceived { command_id: CommandId, link_id: LinkId, request_id: RequestId, segment_index: u64, total_segments: u64, data: &'a [u8], }, ChannelMessageReceived { link_id: LinkId, message_type: MessageType, data: &'a [u8], }, LinkClosed { link_id: LinkId, reason: LinkClosedReason, }, LinkInterfaceMismatch { link_id: LinkId, attached_interface: InterfaceId, arrived_on: InterfaceId, }, ResourceReceived { link_id: LinkId, hash: ResourceHash, metadata: Option<&'a [u8]>, data: &'a [u8], }, ResourceFailed { link_id: LinkId, hash: ResourceHash, cause: ResourceFailureCause, }, ResourceNeedsDecompression { link_id: LinkId, hash: ResourceHash, stream: &'a [u8], uncompressed_data_bytes: u64, }, ResourceSegmentReceived { link_id: LinkId, original_hash: ResourceHash, segment_index: u64, total_segments: u64, metadata: Option<&'a [u8]>, data: &'a [u8], }, ResourceAssembled { link_id: LinkId, original_hash: ResourceHash, total_size_bytes: u64, }, RouteRemoved { destination: DestinationHash, cause: RouteRemovalCause, },
}

Variants§

§

AnnounceHeard

RNS 1.4.2’s announce-handler received_announce callback as data.

Fields

§observation: AnnounceObservation<'a>
§rate_accounting: AnnounceRateAccounting
§

SelfRatchetRotated

Fields

§destination: DestinationHash
§

PersistenceFlushed

A host persistence worker injected an ordered save notice into the engine journal. The engine itself performs no storage IO.

§

PersistenceFlushFailed

A host persistence worker injected an ordered save-failure notice into the engine journal. Storage-specific error detail stays in the host log.

§

AnnounceHeldDropped

Fields

§destination: DestinationHash
§source_interface: InterfaceId
§

Delivered(Delivery<'a>)

RNS 1.4.2’s destination set_packet_callback delivery as data.

§

CommandSettled

Fields

§settlement: Settlement
§

LinkEstablished(LinkEstablished)

RNS 1.4.2’s set_link_established_callback as data.

§

PeerIdentified

RNS 1.4.2’s remote_identified callback as data.

Fields

§link_id: LinkId
§identity: IdentityHash
§

RequestReceived

RNS 1.4.2’s request handler callback as data.

Fields

§destination: DestinationHash
§link_id: LinkId
§request_id: RequestId
§requested_at: InstantMillis
§data: &'a [u8]
§

ResponseReceived

RNS 1.4.2’s request response_callback as data.

Fields

§command_id: CommandId
§link_id: LinkId
§request_id: RequestId
§data: &'a [u8]
§

ResponseSegmentReceived

One verified segment of a split response resource; the receive gate refuses out-of-order chains, so these concatenate in arrival order. The request settles as Settlement::SendRequest when the final segment assembles, not through a Journaled::ResponseReceived.

Fields

§command_id: CommandId
§link_id: LinkId
§request_id: RequestId
§segment_index: u64
§total_segments: u64
§data: &'a [u8]
§

ChannelMessageReceived

RNS 1.4.2 Channel._receive’s callback as data.

Fields

§link_id: LinkId
§message_type: MessageType
§data: &'a [u8]
§

LinkClosed

RNS 1.4.2’s set_link_closed_callback as data.

Fields

§link_id: LinkId
§

LinkInterfaceMismatch

RNS 1.4.2 Link.receive: a packet for an active link arrived on an interface other than the link’s own, dropped unprocessed as a possible manipulation attempt.

Fields

§link_id: LinkId
§attached_interface: InterfaceId
§arrived_on: InterfaceId
§

ResourceReceived

RNS 1.4.2’s resource_concluded callback as data. metadata is the transfer’s packed metadata, stripped from the stream head, opaque to the engine.

Fields

§link_id: LinkId
§metadata: Option<&'a [u8]>
§data: &'a [u8]
§

ResourceFailed

The failure half of RNS 1.4.2’s resource_concluded callback, with the cause the reference never names.

§

ResourceNeedsDecompression

Fields

§link_id: LinkId
§stream: &'a [u8]
§uncompressed_data_bytes: u64
§

ResourceSegmentReceived

One segment of a split resource landed / progress toward Journaled::ResourceAssembled. metadata rides segment one only, stripped from the stream head like the single-segment delivery.

Fields

§link_id: LinkId
§original_hash: ResourceHash
§segment_index: u64
§total_segments: u64
§metadata: Option<&'a [u8]>
§data: &'a [u8]
§

ResourceAssembled

Fields

§link_id: LinkId
§original_hash: ResourceHash
§total_size_bytes: u64
§

RouteRemoved

Fields

§destination: DestinationHash

Trait Implementations§

Source§

impl<'a> From<Journaled<'a>> for PrnsEvent<'a>

Source§

fn from(journaled: Journaled<'a>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for Journaled<'a>

§

impl<'a> RefUnwindSafe for Journaled<'a>

§

impl<'a> Send for Journaled<'a>

§

impl<'a> Sync for Journaled<'a>

§

impl<'a> Unpin for Journaled<'a>

§

impl<'a> UnsafeUnpin for Journaled<'a>

§

impl<'a> UnwindSafe for Journaled<'a>

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.