Struct ic_agent::agent::QueryBuilder [−][src]
pub struct QueryBuilder<'agent> { /* fields omitted */ }
Expand description
A Query Request Builder.
This makes it easier to do query calls without actually passing all arguments.
Implementations
impl<'agent> QueryBuilder<'agent>
[src]
impl<'agent> QueryBuilder<'agent>
[src]pub fn new(
agent: &'agent Agent,
canister_id: Principal,
method_name: String
) -> Self
[src]
agent: &'agent Agent,
canister_id: Principal,
method_name: String
) -> Self
pub fn with_effective_canister_id(
&mut self,
canister_id: Principal
) -> &mut Self
[src]
&mut self,
canister_id: Principal
) -> &mut Self
pub fn with_arg<A: AsRef<[u8]>>(&mut self, arg: A) -> &mut Self
[src]
pub fn expire_at(&mut self, time: SystemTime) -> &mut Self
[src]
pub fn expire_at(&mut self, time: SystemTime) -> &mut Self
[src]Takes a SystemTime converts it to a Duration by calling duration_since(UNIX_EPOCH) to learn about where in time this SystemTime lies. The Duration is converted to nanoseconds and stored in ingress_expiry_datetime
pub fn expire_after(&mut self, duration: Duration) -> &mut Self
[src]
pub fn expire_after(&mut self, duration: Duration) -> &mut Self
[src]Takes a Duration (i.e. 30 sec/5 min 30 sec/1 h 30 min, etc.) and adds it to the Duration of the current SystemTime since the UNIX_EPOCH Subtracts a permitted drift from the sum to account for using system time and not block time. Converts the difference to nanoseconds and stores in ingress_expiry_datetime
Auto Trait Implementations
impl<'agent> !RefUnwindSafe for QueryBuilder<'agent>
impl<'agent> Send for QueryBuilder<'agent>
impl<'agent> Sync for QueryBuilder<'agent>
impl<'agent> Unpin for QueryBuilder<'agent>
impl<'agent> !UnwindSafe for QueryBuilder<'agent>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,