Request

Enum Request 

Source
pub enum Request {
    SaveDna {
        id: String,
        content: Vec<u8>,
    },
    DownloadDna {
        url: String,
    },
    ConfigurePlayer {
        id: String,
        partial_config: String,
    },
    Startup {
        id: String,
        log_level: Option<String>,
    },
    Shutdown {
        id: String,
        signal: Option<String>,
    },
    Reset,
    CallAdminInterface {
        id: String,
        message: Vec<u8>,
    },
    ConnectAppInterface {
        token: Vec<u8>,
        port: u16,
    },
    DisconnectAppInterface {
        port: u16,
    },
    CallAppInterface {
        port: u16,
        message: Vec<u8>,
    },
    DownloadLogs {
        id: String,
    },
}
Expand description

Trycp server requests.

Variants§

§

SaveDna

Given a DNA file, stores the DNA and returns the path at which it is stored.

Fields

§id: String

This is actually the dna filename.

§content: Vec<u8>

Content.

§

DownloadDna

Given a DNA URL, ensures that the DNA is downloaded and returns the path at which it is stored.

Fields

§url: String

Url.

§

ConfigurePlayer

Set up a player.

Fields

§id: String

The player id.

§partial_config: String

The Holochain configuration data that is not provided by trycp.

For example:

signing_service_uri: ~
encryption_service_uri: ~
decryption_service_uri: ~
dpki: ~
network: ~
§

Startup

Start a conductor.

Fields

§id: String

The conductor id.

§log_level: Option<String>

The log level of the conductor.

§

Shutdown

Shut down a conductor.

Fields

§id: String

The id of the conductor to shut down.

§signal: Option<String>

The signal with which to shut down the conductor.

§

Reset

Shuts down all running conductors.

§

CallAdminInterface

Make an admin request.

Fields

§id: String

The conductor id.

§message: Vec<u8>

The request.

§

ConnectAppInterface

Hook up an app interface.

Fields

§token: Vec<u8>

Token.

§port: u16

Port.

§

DisconnectAppInterface

Disconnect an app interface.

Fields

§port: u16

Port.

§

CallAppInterface

Make an ap request.

Fields

§port: u16

Port.

§message: Vec<u8>

The request.

§

DownloadLogs

Request the logs for a player’s conductor and keystore.

Fields

§id: String

The conductor id.

Trait Implementations§

Source§

impl Debug for Request

Source§

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

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

impl<'de> Deserialize<'de> for Request

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 Serialize for Request

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

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> 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, 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,