#[non_exhaustive]
pub enum ExtMsg {
RegisterApp(StormApp),
ListTopics(AddressedMsg<()>),
Topics(AddressedMsg<BTreeSet<MesgId>>),
ProposeTopic(AddressedMsg<Topic>),
Post(AddressedMsg<Mesg>),
Read(AddressedMsg<MesgId>),
ContainerAnnouncement(AddressedMsg<ContainerInfo>),
ContainerRetrieved(ContainerId),
RetrieveContainer(AddressedMsg<ContainerFullId>),
SendContainer(AddressedMsg<ContainerFullId>),
Decline(AddressedMsg<MesgId>),
Accept(AddressedMsg<MesgId>),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RegisterApp(StormApp)
An extension app connecting to the Storm node must first signal with this message its app id. After that storm node will be able to route messages coming from Bifrost network targeting this app.
ListTopics(AddressedMsg<()>)
List topics known to the local Storm node.
Topics(AddressedMsg<BTreeSet<MesgId>>)
Response to ListTopics
request.
ProposeTopic(AddressedMsg<Topic>)
Sent or received propose to create a new Storm application topic which must be accepted or not.
Post(AddressedMsg<Mesg>)
A message sent from Storm node to the app extension on arrival of the new information from remote peer via Bifrost network and from the app extension to the Storm node on sent.
Read(AddressedMsg<MesgId>)
A message from app extension to external peer requesting certain message or a topic from a remote peer.
ContainerAnnouncement(AddressedMsg<ContainerInfo>)
A received container announcement
ContainerRetrieved(ContainerId)
Notification about complete container download
RetrieveContainer(AddressedMsg<ContainerFullId>)
Command from an extension to the main daemon to retrieve container from the remote peer
SendContainer(AddressedMsg<ContainerFullId>)
Command from an extension to the main daemon to send container to the remote peer
Decline(AddressedMsg<MesgId>)
Command to the storm node to decline the topic or a message with a specific id coming from certain peer.
Accept(AddressedMsg<MesgId>)
Command to the storm node to accept the topic or a message with a specific id coming from certain peer. This also requests the node to download all the unknown containers for the topic or the message.
Implementations§
Trait Implementations§
source§impl CreateUnmarshaller for ExtMsg
impl CreateUnmarshaller for ExtMsg
fn create_unmarshaller() -> Unmarshaller<Self>
source§impl StrictDecode for ExtMsg
impl StrictDecode for ExtMsg
source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
std::io::Read
instance; must either
construct an instance or return implementation-specific error type.source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
StrictDecode::strict_decode
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures.source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction.source§impl StrictEncode for ExtMsg
impl StrictEncode for ExtMsg
source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.source§fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
StrictEncode::strict_encode
function