pub struct BaseResource {
pub client: Arc<ComposioClient>,
pub telemetry_context: TelemetryContext,
}Expand description
Base resource structure that implements the Resource trait
Fields§
§client: Arc<ComposioClient>Reference to the Composio client
telemetry_context: TelemetryContextTelemetry context
Implementations§
Source§impl BaseResource
impl BaseResource
Sourcepub fn new(client: Arc<ComposioClient>) -> Self
pub fn new(client: Arc<ComposioClient>) -> Self
Create a new base resource
Sourcepub fn with_telemetry_context(
client: Arc<ComposioClient>,
telemetry_context: TelemetryContext,
) -> Self
pub fn with_telemetry_context( client: Arc<ComposioClient>, telemetry_context: TelemetryContext, ) -> Self
Create a new base resource with custom telemetry context
Trait Implementations§
Source§impl Clone for BaseResource
impl Clone for BaseResource
Source§fn clone(&self) -> BaseResource
fn clone(&self) -> BaseResource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Resource for BaseResource
impl Resource for BaseResource
Source§fn client(&self) -> &ComposioClient
fn client(&self) -> &ComposioClient
Get the client reference
Source§fn telemetry_context(&self) -> &TelemetryContext
fn telemetry_context(&self) -> &TelemetryContext
Get telemetry context
Source§fn sanitize_payload<T>(&self, payload: T) -> Twhere
T: Serialize + DeserializeOwned,
fn sanitize_payload<T>(&self, payload: T) -> Twhere
T: Serialize + DeserializeOwned,
Sanitize payload by removing sensitive information Read more
Source§fn create_method_event(
&self,
function_name: &str,
provider: Option<&str>,
) -> Option<TelemetryData>
fn create_method_event( &self, function_name: &str, provider: Option<&str>, ) -> Option<TelemetryData>
Create a telemetry event for a method call Read more
Source§fn push_telemetry_event(&self, event: Event)
fn push_telemetry_event(&self, event: Event)
Push a telemetry event
Auto Trait Implementations§
impl Freeze for BaseResource
impl !RefUnwindSafe for BaseResource
impl Send for BaseResource
impl Sync for BaseResource
impl Unpin for BaseResource
impl UnsafeUnpin for BaseResource
impl !UnwindSafe for BaseResource
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