pub struct LdpClient { /* private fields */ }Expand description
HTTP client for LDP protocol communication.
Implementations§
Source§impl LdpClient
impl LdpClient
Sourcepub fn with_http_client(http: Client) -> Self
pub fn with_http_client(http: Client) -> Self
Create with a custom HTTP client.
Sourcepub async fn send_message(
&self,
url: &str,
message: &LdpEnvelope,
) -> Result<LdpEnvelope, String>
pub async fn send_message( &self, url: &str, message: &LdpEnvelope, ) -> Result<LdpEnvelope, String>
Send an LDP message and receive a response.
Messages are posted to {url}/ldp/messages as JSON.
Sourcepub async fn fetch_identity_card(
&self,
url: &str,
) -> Result<LdpIdentityCard, String>
pub async fn fetch_identity_card( &self, url: &str, ) -> Result<LdpIdentityCard, String>
Fetch an LDP identity card from a remote delegate.
Identity cards are served at {url}/ldp/identity.
Sourcepub async fn fetch_identity_wellknown(
&self,
url: &str,
) -> Result<LdpIdentityCard, String>
pub async fn fetch_identity_wellknown( &self, url: &str, ) -> Result<LdpIdentityCard, String>
Fetch identity via .well-known convention.
Tries {url}/.well-known/ldp-identity first, falls back to {url}/ldp/identity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LdpClient
impl !RefUnwindSafe for LdpClient
impl Send for LdpClient
impl Sync for LdpClient
impl Unpin for LdpClient
impl UnsafeUnpin for LdpClient
impl !UnwindSafe for LdpClient
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