pub struct ConnectPeerParams {
pub address: Option<String>,
pub pubkey: Option<Pubkey>,
pub save: Option<bool>,
pub addr_type: Option<TransportType>,
}Expand description
Parameters for connecting to a peer.
Fields§
§address: Option<String>The address of the peer to connect to (as a multiaddr string).
Either address or pubkey must be provided.
pubkey: Option<Pubkey>The public key of the peer to connect to. The node resolves the address from locally synced graph data.
save: Option<bool>Whether to save the peer address to the peer store.
addr_type: Option<TransportType>Filter addresses by transport type when connecting by pubkey.
If not specified, the node uses target-specific defaults:
native builds choose from tcp addresses only, while wasm builds choose from ws/wss.
Trait Implementations§
Source§impl Clone for ConnectPeerParams
impl Clone for ConnectPeerParams
Source§fn clone(&self) -> ConnectPeerParams
fn clone(&self) -> ConnectPeerParams
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 ConnectPeerParams
impl Debug for ConnectPeerParams
Source§impl<'de> Deserialize<'de> for ConnectPeerParams
impl<'de> Deserialize<'de> for ConnectPeerParams
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 ConnectPeerParams
impl JsonSchema for ConnectPeerParams
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 ConnectPeerParams
impl RefUnwindSafe for ConnectPeerParams
impl Send for ConnectPeerParams
impl Sync for ConnectPeerParams
impl Unpin for ConnectPeerParams
impl UnsafeUnpin for ConnectPeerParams
impl UnwindSafe for ConnectPeerParams
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