Skip to main content

PackageManagementServiceClient

Struct PackageManagementServiceClient 

Source
pub struct PackageManagementServiceClient<T> { /* private fields */ }
Expand description

Status: experimental interface, will change before it is deemed production ready

Query the Daml-LF packages supported by the ledger participant and upload DAR files. We use ‘backing participant’ to refer to this specific participant in the methods of this API.

Implementations§

Source§

impl PackageManagementServiceClient<Channel>

Source

pub async fn connect<D>( dst: D, ) -> Result<PackageManagementServiceClient<Channel>, Error>
where D: TryInto<Endpoint>, <D as TryInto<Endpoint>>::Error: Into<Box<dyn Error + Send + Sync>>,

Attempt to create a new client by connecting to a given endpoint.

Source§

impl<T> PackageManagementServiceClient<T>
where T: GrpcService<Body>, <T as GrpcService<Body>>::Error: Into<Box<dyn Error + Send + Sync>>, <T as GrpcService<Body>>::ResponseBody: Body<Data = Bytes> + Send + 'static, <<T as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync>> + Send,

Source

pub fn new(inner: T) -> PackageManagementServiceClient<T>

Source

pub fn with_origin(inner: T, origin: Uri) -> PackageManagementServiceClient<T>

Source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> PackageManagementServiceClient<InterceptedService<T, F>>

Source

pub fn send_compressed( self, encoding: CompressionEncoding, ) -> PackageManagementServiceClient<T>

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

Source

pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> PackageManagementServiceClient<T>

Enable decompressing responses.

Source

pub fn max_decoding_message_size( self, limit: usize, ) -> PackageManagementServiceClient<T>

Limits the maximum size of a decoded message.

Default: 4MB

Source

pub fn max_encoding_message_size( self, limit: usize, ) -> PackageManagementServiceClient<T>

Limits the maximum size of an encoded message.

Default: usize::MAX

Source

pub async fn list_known_packages( &mut self, request: impl IntoRequest<ListKnownPackagesRequest>, ) -> Result<Response<ListKnownPackagesResponse>, Status>

Returns the details of all Daml-LF packages known to the backing participant.

Source

pub async fn upload_dar_file( &mut self, request: impl IntoRequest<UploadDarFileRequest>, ) -> Result<Response<UploadDarFileResponse>, Status>

Upload a DAR file to the participant.

If vetting is enabled in the request, the DAR is checked for upgrade compatibility with the set of the already vetted packages on the target vetting synchronizer See UploadDarFileRequest for details regarding vetting and the target vetting synchronizer.

Source

pub async fn validate_dar_file( &mut self, request: impl IntoRequest<ValidateDarFileRequest>, ) -> Result<Response<ValidateDarFileResponse>, Status>

Validates the DAR and checks the upgrade compatibility of the DAR’s packages with the set of the already vetted packages on the target vetting synchronizer. See ValidateDarFileRequest for details regarding the target vetting synchronizer.

The operation has no effect on the state of the participant or the Canton ledger: the DAR payload and its packages are not persisted neither are the packages vetted.

Source

pub async fn update_vetted_packages( &mut self, request: impl IntoRequest<UpdateVettedPackagesRequest>, ) -> Result<Response<UpdateVettedPackagesResponse>, Status>

Update the vetted packages of this participant

Trait Implementations§

Source§

impl<T> Clone for PackageManagementServiceClient<T>
where T: Clone,

Source§

fn clone(&self) -> PackageManagementServiceClient<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for PackageManagementServiceClient<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more