[−][src]Struct dsf_core::prelude::Base
Methods
impl Base
[src]
pub fn new(
id: Id,
application_id: u16,
kind: Kind,
flags: Flags,
version: u16,
body: Body,
public_options: Vec<Options>,
private_options: PrivateOptions
) -> Base
[src]
id: Id,
application_id: u16,
kind: Kind,
flags: Flags,
version: u16,
body: Body,
public_options: Vec<Options>,
private_options: PrivateOptions
) -> Base
pub fn id(&self) -> &Id
[src]
pub fn header(&self) -> &Header
[src]
pub fn flags(&self) -> Flags
[src]
pub fn body(&self) -> &Body
[src]
pub fn public_options(&self) -> &[Options]
[src]
pub fn private_options(&self) -> &PrivateOptions
[src]
pub fn signature(&self) -> &Option<Signature>
[src]
pub fn set_signature(&mut self, sig: Signature)
[src]
pub fn append_public_option(&mut self, o: Options)
[src]
pub fn append_private_option(&mut self, o: Options)
[src]
pub fn clean(&mut self)
[src]
impl Base
[src]
pub fn pub_key_option(options: &[Options]) -> Option<PublicKey>
[src]
pub fn peer_id_option(options: &[Options]) -> Option<Id>
[src]
pub fn issued_option(options: &[Options]) -> Option<DateTime>
[src]
pub fn expiry_option(options: &[Options]) -> Option<DateTime>
[src]
pub fn prev_sig_option(options: &[Options]) -> Option<Signature>
[src]
pub fn address_option(options: &[Options]) -> Option<Address>
[src]
pub fn raw(&self) -> &Option<Vec<u8>>
[src]
pub fn set_raw(&mut self, raw: Vec<u8>)
[src]
impl Base
[src]
pub fn parse<'a, P, S, T: AsRef<[u8]>>(
data: T,
pub_key_s: P,
sec_key_s: S
) -> Result<(Base, usize), BaseError> where
P: FnMut(&Id) -> Option<PublicKey>,
S: FnMut(&Id) -> Option<SecretKey>,
[src]
data: T,
pub_key_s: P,
sec_key_s: S
) -> Result<(Base, usize), BaseError> where
P: FnMut(&Id) -> Option<PublicKey>,
S: FnMut(&Id) -> Option<SecretKey>,
Parses a data array into a base object using the pubkey_source to locate a key for validation
impl Base
[src]
pub fn encode<'a, T: AsRef<[u8]> + AsMut<[u8]>>(
&mut self,
signing_key: Option<&PrivateKey>,
encryption_key: Option<&SecretKey>,
buff: T
) -> Result<usize, BaseError>
[src]
&mut self,
signing_key: Option<&PrivateKey>,
encryption_key: Option<&SecretKey>,
buff: T
) -> Result<usize, BaseError>
Trait Implementations
impl Into<Base> for Request
[src]
impl Into<Base> for Response
[src]
impl Into<Base> for Message
[src]
impl<'_> From<&'_ Page> for Base
[src]
impl Clone for Base
[src]
impl PartialEq<Base> for Base
[src]
impl Debug for Base
[src]
impl TryFrom<Base> for Page
[src]
Auto Trait Implementations
impl Send for Base
impl Sync for Base
impl Unpin for Base
impl UnwindSafe for Base
impl RefUnwindSafe for Base
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,