pub struct LdpAdapter { /* private fields */ }Expand description
LDP protocol adapter.
Can be used standalone or registered with a ProtocolRegistry
(including JamJet’s registry via the jamjet feature).
Implementations§
Source§impl LdpAdapter
impl LdpAdapter
Sourcepub fn new(config: LdpAdapterConfig) -> Self
pub fn new(config: LdpAdapterConfig) -> Self
Create a new LDP adapter with the given configuration.
Sourcepub fn with_client(config: LdpAdapterConfig, client: LdpClient) -> Self
pub fn with_client(config: LdpAdapterConfig, client: LdpClient) -> Self
Create with a custom HTTP client (useful for testing).
Sourcepub fn session_manager(&self) -> &SessionManager
pub fn session_manager(&self) -> &SessionManager
Get the session manager (for external session control).
Trait Implementations§
Source§impl ProtocolAdapter for LdpAdapter
impl ProtocolAdapter for LdpAdapter
Source§fn discover<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<RemoteCapabilities, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn discover<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<RemoteCapabilities, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Discover remote delegate capabilities.
- Fetch LDP identity card
- Validate trust domain (if configured)
- Map to RemoteCapabilities
Source§fn invoke<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
task: TaskRequest,
) -> Pin<Box<dyn Future<Output = Result<TaskHandle, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invoke<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
task: TaskRequest,
) -> Pin<Box<dyn Future<Output = Result<TaskHandle, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Submit a task to an LDP delegate.
- Get or establish session (transparent to caller)
- Send TASK_SUBMIT within session
- Return TaskHandle
Source§fn stream<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
task: TaskRequest,
) -> Pin<Box<dyn Future<Output = Result<TaskStream, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stream<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
task: TaskRequest,
) -> Pin<Box<dyn Future<Output = Result<TaskStream, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stream task progress events.
Submits the task, then polls for updates until completion. In a full implementation, this would use SSE or WebSocket.
Source§fn status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
task_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TaskStatus, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
task_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TaskStatus, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Poll task status.
Auto Trait Implementations§
impl Freeze for LdpAdapter
impl !RefUnwindSafe for LdpAdapter
impl Send for LdpAdapter
impl Sync for LdpAdapter
impl Unpin for LdpAdapter
impl UnsafeUnpin for LdpAdapter
impl !UnwindSafe for LdpAdapter
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