NamedObjectBuilder

Struct NamedObjectBuilder 

Source
pub struct NamedObjectBuilder<DC, BC>{ /* private fields */ }

Implementations§

Source§

impl<DC, BC> NamedObjectBuilder<DC, BC>

Source

pub fn new(desc_content: DC, body_content: BC) -> Self

Source

pub fn desc_builder(&self) -> &NamedObjectDescBuilder<DC>

Source

pub fn mut_desc_builder(&mut self) -> &mut NamedObjectDescBuilder<DC>

Source

pub fn body_builder(&self) -> &ObjectMutBodyBuilder<BC, NamedObjType<DC, BC>>

Source

pub fn dec_id(self, dec_id: ObjectId) -> Self

Source

pub fn option_dec_id(self, dec_id: Option<ObjectId>) -> Self

Source

pub fn ref_objects(self, ref_objects: Vec<ObjectLink>) -> Self

Source

pub fn option_ref_objects(self, ref_objects: Option<Vec<ObjectLink>>) -> Self

Source

pub fn prev(self, prev: ObjectId) -> Self

Source

pub fn option_prev(self, prev: Option<ObjectId>) -> Self

Source

pub fn create_timestamp(self, create_timestamp: HashValue) -> Self

Source

pub fn option_create_timestamp( self, create_timestamp: Option<HashValue>, ) -> Self

Source

pub fn no_create_time(self) -> Self

Source

pub fn create_time(self, create_time: u64) -> Self

Source

pub fn option_create_time(self, create_time: Option<u64>) -> Self

Source

pub fn expired_time(self, expired_time: u64) -> Self

Source

pub fn option_expired_time(self, expired_time: Option<u64>) -> Self

Source

pub fn owner(self, owner: <DC::OwnerType as OwnerObj>::Inner) -> Self

Source

pub fn option_owner(self, owner: DC::OwnerType) -> Self

Source

pub fn area(self, area: <DC::AreaType as AreaObj>::Inner) -> Self

Source

pub fn option_area(self, area: DC::AreaType) -> Self

Source

pub fn author(self, author: <DC::AuthorType as AuthorObj>::Inner) -> Self

Source

pub fn option_author(self, author: DC::AuthorType) -> Self

Source

pub fn public_key(self, public_key: DC::PublicKeyType) -> Self

Source

pub fn option_public_key(self, public_key: Option<DC::PublicKeyType>) -> Self

Source

pub fn update_time(self, update_time: u64) -> Self

Source

pub fn prev_version(self, prev_version: HashValue) -> Self

Source

pub fn user_data(self, user_data: Vec<u8>) -> Self

Source

pub fn set_desc_sign(self, sign: Signature) -> Self

Source

pub fn set_body_sign(self, sign: Signature) -> Self

Source

pub fn push_desc_sign(self, sign: Signature) -> Self

Source

pub fn push_body_sign(self, sign: Signature) -> Self

Source

pub fn nonce(self, nonce: u128) -> Self

Source

pub fn build(self) -> NamedObjectBase<NamedObjType<DC, BC>>

Source§

impl NamedObjectBuilder<ObjectMapDescContent, ObjectMapBodyContent>

Source

pub fn content_type(&self) -> ObjectMapSimpleContentType

Source

pub fn class(self, class: ObjectMapClass) -> Self

Trait Implementations§

Source§

impl<DC, BC> Clone for NamedObjectBuilder<DC, BC>

Source§

fn clone(&self) -> NamedObjectBuilder<DC, BC>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,