Struct dyer::component::profile::Profile [−][src]
Infomation represented to the server, generally, it provide extra, meta data about users and users’ devices, required by server, basically, includes User-Agent
, Accept-Encoding
and so on. For the purposes of extension, customized generic parameter P
is required.
Fields
headers: HashMap<String, String>
represents a heahers
cookie set by server or user
able: f64
checkpoint by which this Profile
is valid for Request
created: f64
meta data that the Profile
is created
pargs: Option<P>
additional arguments for extensive application
Implementations
impl<P> Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
pub fn exec<T>(res: &mut Response<T, P>) -> Result<Profile<P>, ResError> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
default method used to extract Profile
from a Response
, collecting all cookie by
set-cookie
and ignoring others.
pub async fn exec_all<'a, E, T>(
profiles: Arc<Mutex<Vec<Profile<P>>>>,
num: usize,
f: ProfileInfo<'a, T, P>
) where
T: Serialize + for<'de> Deserialize<'de> + Debug + Clone,
P: Serialize + for<'de> Deserialize<'de> + Debug + Clone,
E: Serialize + Debug + Clone,
[src]
profiles: Arc<Mutex<Vec<Profile<P>>>>,
num: usize,
f: ProfileInfo<'a, T, P>
) where
T: Serialize + for<'de> Deserialize<'de> + Debug + Clone,
P: Serialize + for<'de> Deserialize<'de> + Debug + Clone,
E: Serialize + Debug + Clone,
generate multiple Profile
and put them into App
for different uri, different generator functions are required.
impl<P> Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
pub fn stored(path: &str, profiles: &mut Arc<Mutex<Vec<Profile<P>>>>)
[src]
store unfinished or extra Profile
s,
pub fn load(path: &str) -> Vec<Profile<P>>
[src]
load unfinished or extra Profile
s
Trait Implementations
impl<P: Clone> Clone for Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
impl<P: Debug> Debug for Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
impl<P> Default for Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
impl<'de, P> Deserialize<'de> for Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<P> Send for Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
impl<P> Serialize for Profile<P> where
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
P: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
Auto Trait Implementations
impl<P> RefUnwindSafe for Profile<P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
impl<P> Sync for Profile<P> where
P: Sync,
P: Sync,
impl<P> Unpin for Profile<P> where
P: Unpin,
P: Unpin,
impl<P> UnwindSafe for Profile<P> where
P: UnwindSafe,
P: 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> 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>,