Struct rust_ipfs::UninitializedIpfs
source · pub struct UninitializedIpfs { /* private fields */ }
Expand description
Configured Ipfs which can only be started.
Implementations§
source§impl UninitializedIpfs
impl UninitializedIpfs
pub fn new() -> Self
sourcepub fn with_opt(options: IpfsOptions) -> Self
pub fn with_opt(options: IpfsOptions) -> Self
Configures a new UninitializedIpfs with from the given options and optionally a span.
If the span is not given, it is defaulted to tracing::trace_span!("ipfs")
.
The span is attached to all operations called on the later created Ipfs
along with all
operations done in the background task as well as tasks spawned by the underlying
libp2p::Swarm
.
sourcepub fn add_listening_addr(self, addr: Multiaddr) -> Self
pub fn add_listening_addr(self, addr: Multiaddr) -> Self
Adds a listening address
sourcepub fn add_bootstrap(self, addr: Multiaddr) -> Self
pub fn add_bootstrap(self, addr: Multiaddr) -> Self
Adds a bootstrap node
sourcepub fn set_identify_configuration(self, config: IdentifyConfiguration) -> Self
pub fn set_identify_configuration(self, config: IdentifyConfiguration) -> Self
Set identify configuration
sourcepub fn set_transport_configuration(self, config: TransportConfig) -> Self
pub fn set_transport_configuration(self, config: TransportConfig) -> Self
Set transport configuration
sourcepub fn set_swarm_configuration(self, config: SwarmConfig) -> Self
pub fn set_swarm_configuration(self, config: SwarmConfig) -> Self
Set swarm configuration
sourcepub fn set_kad_configuration(
self,
config: KadConfig,
store: Option<KadStoreConfig>
) -> Self
pub fn set_kad_configuration( self, config: KadConfig, store: Option<KadStoreConfig> ) -> Self
Set kad configuration
sourcepub fn set_ping_configuration(self, config: PingConfig) -> Self
pub fn set_ping_configuration(self, config: PingConfig) -> Self
Set ping configuration
sourcepub fn set_keypair(self, keypair: Keypair) -> Self
pub fn set_keypair(self, keypair: Keypair) -> Self
Set keypair
sourcepub fn enable_keepalive(self) -> Self
pub fn enable_keepalive(self) -> Self
Enable keep alive
sourcepub fn enable_mdns(self) -> Self
pub fn enable_mdns(self) -> Self
Enable mdns
sourcepub fn enable_relay(self, with_dcutr: bool) -> Self
pub fn enable_relay(self, with_dcutr: bool) -> Self
Enable relay client
sourcepub fn enable_relay_server(self, config: Option<RelayConfig>) -> Self
pub fn enable_relay_server(self, config: Option<RelayConfig>) -> Self
Enable relay server
sourcepub fn enable_upnp(self) -> Self
pub fn enable_upnp(self) -> Self
Enable port mapping (AKA UPnP)
sourcepub fn disable_delay(self) -> Self
pub fn disable_delay(self) -> Self
Used to delay the loop Note: This may be removed in future