[−][src]Struct pinata_sdk::PinByHash
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 }
Methods
impl PinByHash
[src]
pub fn new<S>(hash: S) -> PinByHash where
S: Into<String>,
[src]
S: Into<String>,
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.
pub fn set_metadata(self, keyvalues: MetadataKeyValues) -> PinByHash
[src]
Consumes the current PinByHash and returns a new PinByHash with keyvalues metadata set
pub fn set_metadata_with_name<S>(
self,
name: S,
keyvalues: HashMap<String, MetadataValue>
) -> PinByHash where
S: Into<String>,
[src]
self,
name: S,
keyvalues: HashMap<String, MetadataValue>
) -> PinByHash where
S: Into<String>,
Consumes the current PinByHash and returns a new PinByHash with metadata name and keyvalues set
pub fn set_options(self, options: PinOptions) -> PinByHash
[src]
Consumes the PinByHash and returns a new PinByHash with pinata options set.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PinByHash
impl Send for PinByHash
impl Sync for PinByHash
impl Unpin for PinByHash
impl UnwindSafe for PinByHash
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,