[][src]Struct dsf_core::base::BaseBuilder

pub struct BaseBuilder { /* fields omitted */ }

Builder for Base.

Methods

impl BaseBuilder[src]

pub fn id(&mut self, value: Id) -> &mut Self[src]

Page or Object Identifier

pub fn header(&mut self, value: Header) -> &mut Self[src]

Header contains object parsing information and flags

pub fn body(&mut self, value: Body) -> &mut Self[src]

Body contains arbitrary service data for Pages, Blocks, and Messages

pub fn private_options(&mut self, value: PrivateOptions) -> &mut Self[src]

Private options supports the addition of options that are only visible to authorized service consumers

pub fn public_options(&mut self, value: Vec<Options>) -> &mut Self[src]

Public options provide a simple mechanism for extension of objects

pub fn parent(&mut self, value: Option<Signature>) -> &mut Self[src]

Page parent / previous page link Used for constructing a hash-chain of published objects and included as a public option This is automatically included / extracted to simplify higher level parsing

pub fn public_key(&mut self, value: Option<PublicKey>) -> &mut Self[src]

Service public key Used to support self-signed objects and included as a public option This is automatically included / extracted to simplify higher level parsing

pub fn peer_id(&mut self, value: Option<Id>) -> &mut Self[src]

Object PeerID Used to support secondary objects and included as a public option This is automatically included / extracted to simplify higher level parsing

pub fn signature(&mut self, value: Option<Signature>) -> &mut Self[src]

Object signature

pub fn raw(&mut self, value: Option<Vec<u8>>) -> &mut Self[src]

Raw object container, used to avoid re-encoding objects

pub fn build(&self) -> Result<Base, String>[src]

Builds a new Base.

Errors

If a required field has not been initialized.

impl BaseBuilder[src]

pub fn base(
    &mut self,
    id: Id,
    application_id: u16,
    kind: Kind,
    index: u16,
    flags: Flags
) -> &mut Self
[src]

pub fn append_public_option(&mut self, o: Options) -> &mut Self[src]

pub fn append_private_option(&mut self, o: Options) -> &mut Self[src]

Trait Implementations

impl Clone for BaseBuilder[src]

impl Default for BaseBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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