pub struct QueryContentRequest {
pub content_cid: ContentCid,
pub max_providers: usize,
}Expand description
Request to query content availability.
§Examples
use chie_shared::QueryContentRequest;
// Query for content with default max providers (20)
let request = QueryContentRequest {
content_cid: "QmExampleContent".to_string(),
max_providers: 20,
};
assert_eq!(request.content_cid, "QmExampleContent");
assert_eq!(request.max_providers, 20);
// Query with custom limit
let limited = QueryContentRequest {
content_cid: "QmAnotherContent".to_string(),
max_providers: 5,
};
assert_eq!(limited.max_providers, 5);Fields§
§content_cid: ContentCidContent CID to query.
max_providers: usizeMaximum number of providers to return.
Trait Implementations§
Source§impl Clone for QueryContentRequest
impl Clone for QueryContentRequest
Source§fn clone(&self) -> QueryContentRequest
fn clone(&self) -> QueryContentRequest
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 Debug for QueryContentRequest
impl Debug for QueryContentRequest
Source§impl<'de> Deserialize<'de> for QueryContentRequest
impl<'de> Deserialize<'de> for QueryContentRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QueryContentRequest
impl RefUnwindSafe for QueryContentRequest
impl Send for QueryContentRequest
impl Sync for QueryContentRequest
impl Unpin for QueryContentRequest
impl UnwindSafe for QueryContentRequest
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