pub struct SuiObjectResponse {
pub data: Option<SuiObjectData>,
pub error: Option<SuiObjectResponseError>,
}Fields§
§data: Option<SuiObjectData>§error: Option<SuiObjectResponseError>Implementations§
Source§impl SuiObjectResponse
impl SuiObjectResponse
pub fn new( data: Option<SuiObjectData>, error: Option<SuiObjectResponseError>, ) -> Self
pub fn new_with_data(data: SuiObjectData) -> Self
pub fn new_with_error(error: SuiObjectResponseError) -> Self
Sourcepub fn object(&self) -> Result<&SuiObjectData, SuiObjectResponseError>
pub fn object(&self) -> Result<&SuiObjectData, SuiObjectResponseError>
Returns a reference to the object if there is any, otherwise an Err if the object does not exist or is deleted.
Sourcepub fn into_object(self) -> Result<SuiObjectData, SuiObjectResponseError>
pub fn into_object(self) -> Result<SuiObjectData, SuiObjectResponseError>
Returns the object value if there is any, otherwise an Err if the object does not exist or is deleted.
pub fn move_object_bcs(&self) -> Option<&Vec<u8>>
pub fn owner(&self) -> Option<Owner>
pub fn object_id(&self) -> Result<Address, MissingObjectIdError>
pub fn object_ref_if_exists(&self) -> Option<(Address, Version, Digest)>
Trait Implementations§
Source§impl Clone for SuiObjectResponse
impl Clone for SuiObjectResponse
Source§fn clone(&self) -> SuiObjectResponse
fn clone(&self) -> SuiObjectResponse
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 SuiObjectResponse
impl Debug for SuiObjectResponse
Source§impl<'de> Deserialize<'de> for SuiObjectResponse
impl<'de> Deserialize<'de> for SuiObjectResponse
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
Source§impl Ord for SuiObjectResponse
impl Ord for SuiObjectResponse
Source§impl PartialEq for SuiObjectResponse
impl PartialEq for SuiObjectResponse
Source§impl PartialOrd for SuiObjectResponse
impl PartialOrd for SuiObjectResponse
Source§impl Serialize for SuiObjectResponse
impl Serialize for SuiObjectResponse
impl Eq for SuiObjectResponse
impl StructuralPartialEq for SuiObjectResponse
Auto Trait Implementations§
impl !Freeze for SuiObjectResponse
impl RefUnwindSafe for SuiObjectResponse
impl Send for SuiObjectResponse
impl Sync for SuiObjectResponse
impl Unpin for SuiObjectResponse
impl UnwindSafe for SuiObjectResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more