pub struct IpfsClientAdapter { /* private fields */ }Expand description
Adaptador para manter compatibilidade total com ipfs_api_backend_hyper::IpfsClient
Implementations§
Source§impl IpfsClientAdapter
impl IpfsClientAdapter
Sourcepub fn new(client: IpfsClient) -> Self
pub fn new(client: IpfsClient) -> Self
Cria um novo adaptador com um cliente IPFS
Sourcepub async fn development() -> Result<Self>
pub async fn development() -> Result<Self>
Cria adaptador para desenvolvimento
Sourcepub async fn production() -> Result<Self>
pub async fn production() -> Result<Self>
Cria adaptador para produção
Sourcepub async fn add<R>(&self, data: R) -> Result<AddResponse>
pub async fn add<R>(&self, data: R) -> Result<AddResponse>
Método compatível com ipfs_api_backend_hyper::IpfsClient::add
Sourcepub async fn cat(&self, hash: &str) -> ConcatStream
pub async fn cat(&self, hash: &str) -> ConcatStream
Método compatível com ipfs_api_backend_hyper::IpfsClient::cat Retorna ConcatStream para manter compatibilidade total
Sourcepub async fn dag_get(&self, cid: &Cid, path: Option<&str>) -> Result<Vec<u8>>
pub async fn dag_get(&self, cid: &Cid, path: Option<&str>) -> Result<Vec<u8>>
Método compatível com dag_get
Sourcepub async fn pubsub_publish(&self, topic: &str, data: &[u8]) -> Result<()>
pub async fn pubsub_publish(&self, topic: &str, data: &[u8]) -> Result<()>
Método compatível para pubsub publish
Sourcepub async fn pubsub_subscribe(&self, topic: &str) -> Result<PubsubStream>
pub async fn pubsub_subscribe(&self, topic: &str) -> Result<PubsubStream>
Método compatível para pubsub subscribe
Sourcepub async fn pubsub_peers(&self, topic: &str) -> Result<Vec<PeerId>>
pub async fn pubsub_peers(&self, topic: &str) -> Result<Vec<PeerId>>
Método compatível para pubsub peers
Sourcepub async fn pubsub_topics(&self) -> Result<Vec<String>>
pub async fn pubsub_topics(&self) -> Result<Vec<String>>
Método compatível para pubsub topics
Sourcepub async fn swarm_connect(&self, peer: &PeerId) -> Result<()>
pub async fn swarm_connect(&self, peer: &PeerId) -> Result<()>
Método compatível para swarm connect
Sourcepub async fn swarm_peers(&self) -> Result<Vec<PeerInfo>>
pub async fn swarm_peers(&self) -> Result<Vec<PeerInfo>>
Método compatível para swarm peers
Sourcepub async fn pin_add(&self, hash: &str, recursive: bool) -> Result<PinResponse>
pub async fn pin_add(&self, hash: &str, recursive: bool) -> Result<PinResponse>
Método compatível para pin add
Sourcepub async fn pin_rm(&self, hash: &str) -> Result<PinResponse>
pub async fn pin_rm(&self, hash: &str) -> Result<PinResponse>
Método compatível para pin rm
Sourcepub async fn pin_ls(
&self,
pin_type: Option<PinType>,
) -> Result<Vec<PinResponse>>
pub async fn pin_ls( &self, pin_type: Option<PinType>, ) -> Result<Vec<PinResponse>>
Método compatível para pin ls
Sourcepub fn inner(&self) -> &IpfsClient
pub fn inner(&self) -> &IpfsClient
Acesso ao cliente interno
Sourcepub fn get_channel_id(&self, other_peer: &PeerId) -> String
pub fn get_channel_id(&self, other_peer: &PeerId) -> String
Gera channel ID (compatibilidade com one_on_one_channel.rs)
Auto Trait Implementations§
impl Freeze for IpfsClientAdapter
impl !RefUnwindSafe for IpfsClientAdapter
impl Send for IpfsClientAdapter
impl Sync for IpfsClientAdapter
impl Unpin for IpfsClientAdapter
impl !UnwindSafe for IpfsClientAdapter
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> 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<'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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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> 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