pub struct SourceClient { /* private fields */ }Implementations§
Source§impl SourceClient
impl SourceClient
pub fn new(handle: NativeRequestHandle<Source>) -> Self
pub fn from_dependencies( dependencies: &PluginDependencies, ) -> Result<Self, RuntimeFailure>
pub fn from_requirement( dependencies: &PluginDependencies, requirement_id: &str, ) -> Result<Self, RuntimeFailure>
pub async fn fetch( &self, request: FetchRequest, ) -> Result<FetchResponse, SourceInvocationError>
pub async fn fetch_with_context( &self, context: InvocationContext, request: FetchRequest, ) -> Result<FetchResponse, SourceInvocationError>
Trait Implementations§
Source§impl CapabilityClient for SourceClient
impl CapabilityClient for SourceClient
Source§const CAPABILITY_ID: &'static str = CAPABILITY_ID
const CAPABILITY_ID: &'static str = CAPABILITY_ID
Stable Capability identity required by this client.
Source§const DESCRIPTOR_VERSION: &'static str = DESCRIPTOR_VERSION
const DESCRIPTOR_VERSION: &'static str = DESCRIPTOR_VERSION
Exact Descriptor version understood by this generated client.
Source§type Dependencies = PluginDependencies
type Dependencies = PluginDependencies
Adapter-owned dependency view used to connect this client.
Source§type Error = RuntimeFailure
type Error = RuntimeFailure
Adapter-owned failure returned when connection cannot complete.
Source§fn from_dependencies(
dependencies: &PluginDependencies,
) -> Result<Self, RuntimeFailure>
fn from_dependencies( dependencies: &PluginDependencies, ) -> Result<Self, RuntimeFailure>
Connects this client to one Plugin Instance’s resolved dependencies.
Source§fn from_requirement(
dependencies: &PluginDependencies,
requirement_id: &str,
) -> Result<Self, RuntimeFailure>
fn from_requirement( dependencies: &PluginDependencies, requirement_id: &str, ) -> Result<Self, RuntimeFailure>
Connects this client to one source-named requirement. Read more
Source§fn already_connected() -> RuntimeFailure
fn already_connected() -> RuntimeFailure
Creates the adapter failure for an invalid second connection attempt.
Source§impl CapabilityClientMany for SourceClient
impl CapabilityClientMany for SourceClient
Source§fn many_from_dependencies(
dependencies: &PluginDependencies,
) -> Result<Vec<BoundCapabilityClient<Self>>, RuntimeFailure>
fn many_from_dependencies( dependencies: &PluginDependencies, ) -> Result<Vec<BoundCapabilityClient<Self>>, RuntimeFailure>
Connects one typed client per bound provider without performing discovery.
Source§fn many_from_requirement(
dependencies: &PluginDependencies,
requirement_id: &str,
) -> Result<Vec<BoundCapabilityClient<Self>>, RuntimeFailure>
fn many_from_requirement( dependencies: &PluginDependencies, requirement_id: &str, ) -> Result<Vec<BoundCapabilityClient<Self>>, RuntimeFailure>
Connects every provider bound to one source-named requirement.
Source§impl Clone for SourceClient
impl Clone for SourceClient
Auto Trait Implementations§
impl !RefUnwindSafe for SourceClient
impl !Send for SourceClient
impl !Sync for SourceClient
impl !UnwindSafe for SourceClient
impl Freeze for SourceClient
impl Unpin for SourceClient
impl UnsafeUnpin for SourceClient
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