pub struct PinByHash { /* private fields */ }
Expand description

Request object to pin hash of an already existing IPFS hash to pinata.

Example

let api = PinataApi::new("api_key", "secret_api_key").unwrap();
 
let result = api.pin_by_hash(PinByHash::new("hash")).await;
 
if let Ok(pinning_job) = result {
  // track result job here
}

Implementations

Create a new default PinByHash object with only the hash to pin set.

To set the pinata metadata and pinata options use the set_metadata() and set_options() chainable function to set those values.

Consumes the current PinByHash and returns a new PinByHash with keyvalues metadata set

Consumes the current PinByHash and returns a new PinByHash with metadata name and keyvalues set

Consumes the PinByHash and returns a new PinByHash with pinata options set.

Trait Implementations

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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