Enum stripe::Expandable [−][src]
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:
ⓘ
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]
pub 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,
[src]
T: RefUnwindSafe,
<T as Object>::Id: RefUnwindSafe,
impl<T> Send for Expandable<T> where
T: Send,
<T as Object>::Id: Send,
[src]
T: Send,
<T as Object>::Id: Send,
impl<T> Sync for Expandable<T> where
T: Sync,
<T as Object>::Id: Sync,
[src]
T: Sync,
<T as Object>::Id: Sync,
impl<T> Unpin for Expandable<T> where
<T as Object>::Id: Unpin,
[src]
<T as Object>::Id: Unpin,
impl<T> UnwindSafe for Expandable<T> where
T: UnwindSafe,
<T as Object>::Id: UnwindSafe,
[src]
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,
pub 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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,