Enum solana_core::rpc::OptionalContext [−][src]
pub enum OptionalContext<T> { Context(RpcResponse<T>), NoContext(T), }
Expand description
Wrapper for rpc return types of methods that provide responses both with and without context. Main purpose of this is to fix methods that lack context information in their return type, without breaking backwards compatibility.
Variants
Context(RpcResponse<T>)
Trait Implementations
impl<T: Clone> Clone for OptionalContext<T>
[src]
impl<T: Clone> Clone for OptionalContext<T>
[src]fn clone(&self) -> OptionalContext<T>
[src]
fn clone(&self) -> OptionalContext<T>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for OptionalContext<T>
[src]
impl<T: Debug> Debug for OptionalContext<T>
[src]impl<'de, T> Deserialize<'de> for OptionalContext<T> where
T: Deserialize<'de>,
[src]
impl<'de, T> Deserialize<'de> for OptionalContext<T> where
T: Deserialize<'de>,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<T: PartialEq> PartialEq<OptionalContext<T>> for OptionalContext<T>
[src]
impl<T: PartialEq> PartialEq<OptionalContext<T>> for OptionalContext<T>
[src]fn eq(&self, other: &OptionalContext<T>) -> bool
[src]
fn eq(&self, other: &OptionalContext<T>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &OptionalContext<T>) -> bool
[src]
fn ne(&self, other: &OptionalContext<T>) -> bool
[src]This method tests for !=
.
impl<T> Serialize for OptionalContext<T> where
T: Serialize,
[src]
impl<T> Serialize for OptionalContext<T> where
T: Serialize,
[src]impl<T> StructuralPartialEq for OptionalContext<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for OptionalContext<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for OptionalContext<T> where
T: Send,
T: Send,
impl<T> Sync for OptionalContext<T> where
T: Sync,
T: Sync,
impl<T> Unpin for OptionalContext<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for OptionalContext<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
[src]
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
[src]pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
[src]
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
[src]
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
[src]pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
[src]
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
impl<T> AbiExample for T
[src]
impl<T> AbiExample for T
[src]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> 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> IntoRequest<T> for T
[src]
impl<T> IntoRequest<T> for T
[src]pub fn into_request(self) -> Request<T>
[src]
pub fn into_request(self) -> Request<T>
[src]Wrap the input message T
in a tonic::Request
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,