pub struct UninitializedIpfs<C: NetworkBehaviour<ToSwarm = Void> + Send> { /* private fields */ }
Expand description
Configured Ipfs which can only be started.
Implementations§
Source§impl<C: NetworkBehaviour<ToSwarm = Void> + Send> UninitializedIpfs<C>
impl<C: NetworkBehaviour<ToSwarm = Void> + Send> UninitializedIpfs<C>
Sourcepub fn set_default_listener(self) -> Self
pub fn set_default_listener(self) -> Self
Set default listening unspecified ipv4 and ipv6 addresseses for tcp and udp/quic
Sourcepub fn set_storage_type(self, storage_type: StorageType) -> Self
pub fn set_storage_type(self, storage_type: StorageType) -> Self
Set storage type for the repo.
Sourcepub fn add_listening_addr(self, addr: Multiaddr) -> Self
pub fn add_listening_addr(self, addr: Multiaddr) -> Self
Adds a listening address
Sourcepub fn set_connection_limits(self, connection_limits: ConnectionLimits) -> Self
pub fn set_connection_limits(self, connection_limits: ConnectionLimits) -> Self
Set a connection limit
Sourcepub fn set_connection_event_capacity(self, cap: usize) -> Self
pub fn set_connection_event_capacity(self, cap: usize) -> Self
Set connection event capacity
Sourcepub fn add_listening_addrs(self, addrs: Vec<Multiaddr>) -> Self
pub fn add_listening_addrs(self, addrs: Vec<Multiaddr>) -> Self
Adds a listening addresses
Sourcepub fn set_listening_addrs(self, addrs: Vec<Multiaddr>) -> Self
pub fn set_listening_addrs(self, addrs: Vec<Multiaddr>) -> Self
Set a list of listening addresses
Sourcepub fn add_bootstrap(self, addr: Multiaddr) -> Self
pub fn add_bootstrap(self, addr: Multiaddr) -> Self
Adds a bootstrap node
Sourcepub fn with_default(self) -> Self
pub fn with_default(self) -> Self
Load default behaviour for basic functionality
Sourcepub fn with_kademlia(
self,
config: impl Into<Either<KadConfig, Config>>,
store: KadStoreConfig,
) -> Self
pub fn with_kademlia( self, config: impl Into<Either<KadConfig, Config>>, store: KadStoreConfig, ) -> Self
Enables kademlia
Sourcepub fn with_bitswap(self) -> Self
pub fn with_bitswap(self) -> Self
Enables bitswap
Sourcepub fn with_relay(self, with_dcutr: bool) -> Self
pub fn with_relay(self, with_dcutr: bool) -> Self
Enable relay client
Sourcepub fn with_relay_server(self, config: RelayConfig) -> Self
pub fn with_relay_server(self, config: RelayConfig) -> Self
Enable relay server
Sourcepub fn with_rendezvous_server(self) -> Self
pub fn with_rendezvous_server(self) -> Self
Enables rendezvous server
Sourcepub fn with_rendezvous_client(self) -> Self
pub fn with_rendezvous_client(self) -> Self
Enables rendezvous client
Sourcepub fn with_identify(self, config: IdentifyConfiguration) -> Self
pub fn with_identify(self, config: IdentifyConfiguration) -> Self
Enables identify
Sourcepub fn with_pubsub(self, config: PubsubConfig) -> Self
pub fn with_pubsub(self, config: PubsubConfig) -> Self
Enables pubsub
Sourcepub fn with_request_response(self, config: Vec<RequestResponseConfig>) -> Self
pub fn with_request_response(self, config: Vec<RequestResponseConfig>) -> Self
Enables request response. Note: At this time, this option will only support up to 10 request-response behaviours. with any additional being ignored. Additionally, any duplicated protocols that are provided will be ignored.
Sourcepub fn with_autonat(self) -> Self
pub fn with_autonat(self) -> Self
Enables autonat
Sourcepub fn with_ping(self, config: PingConfig) -> Self
pub fn with_ping(self, config: PingConfig) -> Self
Enables ping
Sourcepub fn with_custom_behaviour(self, behaviour: C) -> Self
pub fn with_custom_behaviour(self, behaviour: C) -> Self
Set a custom behaviour
Sourcepub fn set_temp_pin_duration(self, duration: Duration) -> Self
pub fn set_temp_pin_duration(self, duration: Duration) -> Self
Set a duration for which blocks are not removed due to the garbage collector Defaults: 2 mins
Sourcepub fn set_transport_configuration(self, config: TransportConfig) -> Self
pub fn set_transport_configuration(self, config: TransportConfig) -> Self
Set transport configuration
Sourcepub fn set_idle_connection_timeout(self, duration: u64) -> Self
pub fn set_idle_connection_timeout(self, duration: u64) -> Self
Set timeout for idle connections
Sourcepub fn set_swarm_configuration(self, config: SwarmConfig) -> Self
pub fn set_swarm_configuration(self, config: SwarmConfig) -> Self
Set swarm configuration
Sourcepub fn default_record_key_validator(self) -> Self
pub fn default_record_key_validator(self) -> Self
Set default record validator for IPFS
Note: This will override any keys set for ipns
prefix
pub fn set_record_prefix_validator( self, key: &str, callback: Arc<dyn Fn(&str) -> Result<Key> + Sync + Send>, ) -> Self
Sourcepub fn set_addrbook_configuration(self, config: AddressBookConfig) -> Self
pub fn set_addrbook_configuration(self, config: AddressBookConfig) -> Self
Set address book configuration
Sourcepub fn set_provider(self, opt: RepoProvider) -> Self
pub fn set_provider(self, opt: RepoProvider) -> Self
Set RepoProvider option to provide blocks automatically
Sourcepub fn set_keypair(self, keypair: &Keypair) -> Self
pub fn set_keypair(self, keypair: &Keypair) -> Self
Set keypair
Sourcepub fn set_keystore(self, keystore: &Keystore) -> Self
pub fn set_keystore(self, keystore: &Keystore) -> Self
Set a keystore
Sourcepub fn listen_as_external_addr(self) -> Self
pub fn listen_as_external_addr(self) -> Self
Automatically add any listened address as an external address
Sourcepub fn with_custom_transport(
self,
transport: Box<dyn Fn(&Keypair, Option<Transport>) -> Result<Boxed<(PeerId, StreamMuxerBox)>> + Sync + Send + 'static>,
) -> Self
pub fn with_custom_transport( self, transport: Box<dyn Fn(&Keypair, Option<Transport>) -> Result<Boxed<(PeerId, StreamMuxerBox)>> + Sync + Send + 'static>, ) -> Self
Set a transport
Sourcepub fn swarm_events<F>(self, func: F) -> Self
pub fn swarm_events<F>(self, func: F) -> Self
Handle libp2p swarm events
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for UninitializedIpfs<C>where
C: Freeze,
impl<C> !RefUnwindSafe for UninitializedIpfs<C>
impl<C> Send for UninitializedIpfs<C>
impl<C> Sync for UninitializedIpfs<C>where
C: Sync,
impl<C> Unpin for UninitializedIpfs<C>where
C: Unpin,
impl<C> !UnwindSafe for UninitializedIpfs<C>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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