Enum ProtocolMessage

Source
pub enum ProtocolMessage {
Show 17 variants Probe([u8; 2]), ProbeResponse(ProbeResponse), Relay(RelayRequest), RelayResponse(RelayResponse), Tunnel(TunnelRequest), TunnelResponse(TunnelResponse), Noise(Noise), Start(StartProtocol), ServerHello(ServerHello), ClientAuth(ClientAuth), AuthResult(AuthResult), ExtRequest(ExtRequest), ExtResponse(ExtResponse), AdminResponse(AdminResponse), ClientMessage(ClientMessage), AppMessage(AppMessage), CoreMessage(CoreMessage),
}

Variants§

§

Probe([u8; 2])

§

ProbeResponse(ProbeResponse)

§

Relay(RelayRequest)

§

RelayResponse(RelayResponse)

§

Tunnel(TunnelRequest)

§

TunnelResponse(TunnelResponse)

§

Noise(Noise)

§

Start(StartProtocol)

§

ServerHello(ServerHello)

§

ClientAuth(ClientAuth)

§

AuthResult(AuthResult)

§

ExtRequest(ExtRequest)

§

ExtResponse(ExtResponse)

§

AdminResponse(AdminResponse)

§

ClientMessage(ClientMessage)

§

AppMessage(AppMessage)

§

CoreMessage(CoreMessage)

Implementations§

Source§

impl ProtocolMessage

Source

pub fn id(&self) -> Option<i64>

Source

pub fn set_id(&mut self, id: i64)

Source

pub fn type_id(&self) -> TypeId

Source

pub fn get_actor(&self) -> Box<dyn EActor>

Source

pub fn from_client_response_err(err: ServerError) -> ProtocolMessage

Source

pub fn from_client_request_v0( req: ClientRequestContentV0, overlay: OverlayId, ) -> ProtocolMessage

Source

pub fn is_block(&self) -> bool

Trait Implementations§

Source§

impl Clone for ProtocolMessage

Source§

fn clone(&self) -> ProtocolMessage

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ProtocolMessage

Source§

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

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

impl<'de> Deserialize<'de> for ProtocolMessage

Source§

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 From<()> for ProtocolMessage

Source§

fn from(_msg: ()) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AddInvitation> for ProtocolMessage

Source§

fn from(_msg: AddInvitation) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AddUser> for ProtocolMessage

Source§

fn from(_msg: AddUser) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AdminRequest> for ProtocolMessage

Source§

fn from(msg: AdminRequest) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AdminResponse> for ProtocolMessage

Source§

fn from(msg: AdminResponse) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AdminResponseV0> for ProtocolMessage

Source§

fn from(msg: AdminResponseV0) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AppMessage> for ProtocolMessage

Source§

fn from(msg: AppMessage) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AppMessageContentV0> for ProtocolMessage

Source§

fn from(content: AppMessageContentV0) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<AuthResult> for ProtocolMessage

Source§

fn from(msg: AuthResult) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<Block> for ProtocolMessage

Source§

fn from(b: Block) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<BlocksExist> for ProtocolMessage

Source§

fn from(msg: BlocksExist) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<BlocksFound> for ProtocolMessage

Source§

fn from(b: BlocksFound) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<BlocksGet> for ProtocolMessage

Source§

fn from(msg: BlocksGet) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<BlocksPut> for ProtocolMessage

Source§

fn from(msg: BlocksPut) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ClientAuth> for ProtocolMessage

Source§

fn from(msg: ClientAuth) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ClientResponse> for ProtocolMessage

Source§

fn from(msg: ClientResponse) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ClientResponseContentV0> for ProtocolMessage

Source§

fn from(msg: ClientResponseContentV0) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<CommitGet> for ProtocolMessage

Source§

fn from(msg: CommitGet) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<CoreBrokerConnect> for ProtocolMessage

Source§

fn from(_msg: CoreBrokerConnect) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<DelUser> for ProtocolMessage

Source§

fn from(_msg: DelUser) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ExtObjectGetV0> for ProtocolMessage

Source§

fn from(_msg: ExtObjectGetV0) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ExtResponseV0> for ProtocolMessage

Source§

fn from(msg: ExtResponseV0) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ExtWalletGetExportV0> for ProtocolMessage

Source§

fn from(_msg: ExtWalletGetExportV0) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ListInvitations> for ProtocolMessage

Source§

fn from(_msg: ListInvitations) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<ListUsers> for ProtocolMessage

Source§

fn from(_msg: ListUsers) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<PinRepo> for ProtocolMessage

Source§

fn from(msg: PinRepo) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<PubKey> for ProtocolMessage

Source§

fn from(_msg: UserId) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<PublishEvent> for ProtocolMessage

Source§

fn from(msg: PublishEvent) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<RepoPinStatus> for ProtocolMessage

Source§

fn from(res: RepoPinStatus) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<RepoPinStatusReq> for ProtocolMessage

Source§

fn from(msg: RepoPinStatusReq) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl<A> From<Result<A, ServerError>> for ProtocolMessage

Source§

fn from(res: Result<A, ServerError>) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<Result<EmptyAppResponse, ServerError>> for ProtocolMessage

Source§

fn from(res: Result<EmptyAppResponse, ServerError>) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<TopicSub> for ProtocolMessage

Source§

fn from(msg: TopicSub) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<TopicSubRes> for ProtocolMessage

Source§

fn from(res: TopicSubRes) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<TopicSyncReq> for ProtocolMessage

Source§

fn from(msg: TopicSyncReq) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<TopicSyncRes> for ProtocolMessage

Source§

fn from(b: TopicSyncRes) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<Vec<TopicSubRes>> for ProtocolMessage

Source§

fn from(res: RepoOpened) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl From<WalletPutExport> for ProtocolMessage

Source§

fn from(msg: WalletPutExport) -> ProtocolMessage

Converts to this type from the input type.
Source§

impl Serialize for ProtocolMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<&ProtocolMessage> for ServerError

Source§

type Error = NgError

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

fn try_from(msg: &ProtocolMessage) -> Result<Self, NgError>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ()

Source§

type Error = ProtocolError

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

fn try_from(_msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for AddInvitation

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for AddUser

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for AdminResponse

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for AppMessageContentV0

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for Block

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for BlocksExist

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for BlocksFound

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for BlocksGet

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for BlocksPut

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ClientRequestContentV0

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ClientResponseContentV0

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for CommitGet

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for CoreBrokerConnectResponse

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for DelUser

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for EmptyAppResponse

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ExportedWallet

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<ExportedWallet, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ExtObjectGetV0

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ExtResponse

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ExtResponseContentV0

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ExtWalletGetExportV0

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ListInvitations

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ListUsers

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for PinRepo

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for ProbeResponse

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for UserId

Source§

type Error = ProtocolError

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

fn try_from(_msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for PublishEvent

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for RepoPinStatus

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for RepoPinStatusReq

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for TopicSub

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for TopicSubRes

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for TopicSyncReq

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for TopicSyncRes

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for Vec<Block>

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Vec<Block>, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for RepoOpened

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ProtocolMessage> for WalletPutExport

Source§

type Error = ProtocolError

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

fn try_from(msg: ProtocolMessage) -> Result<Self, Self::Error>

Performs the conversion.

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T