[−][src]Enum stripe::Expandable
An id or object.
By default stripe will return an id for most fields, but if more detail is
necessary the expand
parameter can be provided to ask for the id to be
loaded as an object instead:
ⓘThis example is not tested
Charge::retrieve(&client, &charge_id, &["invoice.customer"])
Variants
Id(T::Id)
Object(Box<T>)
Implementations
impl<T> Expandable<T> where
T: Object,
T::Id: Clone,
[src]
T: Object,
T::Id: Clone,
impl<T: Object> Expandable<T>
[src]
pub fn is_object(&self) -> bool
[src]
pub fn as_object(&self) -> Option<&T>
[src]
pub fn to_object(self) -> Option<T>
[src]
👎 Deprecated:
Renamed into_object
per rust api design guidelines (may be removed in v0.12)
pub fn into_object(self) -> Option<T>
[src]
Trait Implementations
impl<T: Clone + Object> Clone for Expandable<T> where
T::Id: Clone,
[src]
T::Id: Clone,
fn clone(&self) -> Expandable<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug + Object> Debug for Expandable<T> where
T::Id: Debug,
[src]
T::Id: Debug,
impl<'de, T: Object> Deserialize<'de> for Expandable<T> where
T: Deserialize<'de>,
T::Id: Deserialize<'de>,
[src]
T: Deserialize<'de>,
T::Id: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T: Object> Serialize for Expandable<T> where
T: Serialize,
T::Id: Serialize,
[src]
T: Serialize,
T::Id: Serialize,
Auto Trait Implementations
impl<T> RefUnwindSafe for Expandable<T> where
T: RefUnwindSafe,
<T as Object>::Id: RefUnwindSafe,
T: RefUnwindSafe,
<T as Object>::Id: RefUnwindSafe,
impl<T> Send for Expandable<T> where
T: Send,
<T as Object>::Id: Send,
T: Send,
<T as Object>::Id: Send,
impl<T> Sync for Expandable<T> where
T: Sync,
<T as Object>::Id: Sync,
T: Sync,
<T as Object>::Id: Sync,
impl<T> Unpin for Expandable<T> where
<T as Object>::Id: Unpin,
<T as Object>::Id: Unpin,
impl<T> UnwindSafe for Expandable<T> where
T: UnwindSafe,
<T as Object>::Id: UnwindSafe,
T: UnwindSafe,
<T as Object>::Id: UnwindSafe,
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,