[][src]Struct openidconnect::ResponseTypes

pub struct ResponseTypes<RT: ResponseType>(_);

Informs the Authorization Server of the desired authorization processing flow, including what parameters are returned from the endpoints used.

See OAuth 2.0 Multiple Response Type Encoding Practices for further details.

Implementations

impl<RT: ResponseType> ResponseTypes<RT>[src]

pub fn new(s: Vec<RT>) -> Self[src]

Create a new ResponseTypes to wrap the given Vec.

Methods from Deref<Target = Vec<RT>>

pub fn capacity(&self) -> usize1.0.0[src]

Returns the number of elements the vector can hold without reallocating.

Examples

let vec: Vec<i32> = Vec::with_capacity(10);
assert_eq!(vec.capacity(), 10);

pub fn as_slice(&self) -> &[T]1.7.0[src]

Extracts a slice containing the entire vector.

Equivalent to &s[..].

Examples

use std::io::{self, Write};
let buffer = vec![1, 2, 3, 5, 8];
io::sink().write(buffer.as_slice()).unwrap();

pub fn as_ptr(&self) -> *const T1.37.0[src]

Returns a raw pointer to the vector's buffer.

The caller must ensure that the vector outlives the pointer this function returns, or else it will end up pointing to garbage. Modifying the vector may cause its buffer to be reallocated, which would also make any pointers to it invalid.

The caller must also ensure that the memory the pointer (non-transitively) points to is never written to (except inside an UnsafeCell) using this pointer or any pointer derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

Examples

let x = vec![1, 2, 4];
let x_ptr = x.as_ptr();

unsafe {
    for i in 0..x.len() {
        assert_eq!(*x_ptr.add(i), 1 << i);
    }
}

pub fn alloc_ref(&self) -> &A[src]

🔬 This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

pub fn len(&self) -> usize1.0.0[src]

Returns the number of elements in the vector, also referred to as its 'length'.

Examples

let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);

pub fn is_empty(&self) -> bool1.0.0[src]

Returns true if the vector contains no elements.

Examples

let mut v = Vec::new();
assert!(v.is_empty());

v.push(1);
assert!(!v.is_empty());

Trait Implementations

impl<RT: Clone + ResponseType> Clone for ResponseTypes<RT>[src]

impl<RT: Debug + ResponseType> Debug for ResponseTypes<RT>[src]

impl<RT: ResponseType> Deref for ResponseTypes<RT>[src]

type Target = Vec<RT>

The resulting type after dereferencing.

impl<'de, RT: ResponseType> Deserialize<'de> for ResponseTypes<RT>[src]

impl<RT: PartialEq + ResponseType> PartialEq<ResponseTypes<RT>> for ResponseTypes<RT>[src]

impl<RT: ResponseType> Serialize for ResponseTypes<RT>[src]

impl<RT: ResponseType> StructuralPartialEq for ResponseTypes<RT>[src]

Auto Trait Implementations

impl<RT> RefUnwindSafe for ResponseTypes<RT> where
    RT: RefUnwindSafe

impl<RT> Send for ResponseTypes<RT> where
    RT: Send

impl<RT> Sync for ResponseTypes<RT> where
    RT: Sync

impl<RT> Unpin for ResponseTypes<RT> where
    RT: Unpin

impl<RT> UnwindSafe for ResponseTypes<RT> where
    RT: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,