pub struct NamedObjectDescBuilder<T: DescContent> { /* private fields */ }
Expand description
§NamedObjectDesc 的 构造器
通过Builder模式创建BaseObjectDesc
Implementations§
Source§impl<T: DescContent> NamedObjectDescBuilder<T>
impl<T: DescContent> NamedObjectDescBuilder<T>
pub fn new(obj_type: u16, t: T) -> Self
pub fn desc_content(&self) -> &T
pub fn mut_desc_content(&mut self) -> &mut T
pub fn dec_id(self, value: ObjectId) -> Self
pub fn option_dec_id(self, value: Option<ObjectId>) -> Self
pub fn ref_objects(self, value: Vec<ObjectLink>) -> Self
pub fn option_ref_objects(self, value: Option<Vec<ObjectLink>>) -> Self
pub fn prev(self, value: ObjectId) -> Self
pub fn option_prev(self, value: Option<ObjectId>) -> Self
pub fn create_timestamp(self, value: HashValue) -> Self
pub fn option_create_timestamp(self, value: Option<HashValue>) -> Self
pub fn create_time(self, value: u64) -> Self
pub fn option_create_time(self, value: Option<u64>) -> Self
pub fn expired_time(self, value: u64) -> Self
pub fn option_expired_time(self, value: Option<u64>) -> Self
pub fn owner(self, value: <T::OwnerType as OwnerObj>::Inner) -> Self
pub fn option_owner(self, value: T::OwnerType) -> Self
pub fn area(self, value: <T::AreaType as AreaObj>::Inner) -> Self
pub fn option_area(self, value: T::AreaType) -> Self
pub fn public_key(self, value: T::PublicKeyType) -> Self
pub fn option_public_key(self, value: Option<T::PublicKeyType>) -> Self
pub fn version(self, version: u16) -> Self
pub fn build(self) -> NamedObjectDesc<T>
Trait Implementations§
Source§impl<T: Clone + DescContent> Clone for NamedObjectDescBuilder<T>
impl<T: Clone + DescContent> Clone for NamedObjectDescBuilder<T>
Source§fn clone(&self) -> NamedObjectDescBuilder<T>
fn clone(&self) -> NamedObjectDescBuilder<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for NamedObjectDescBuilder<T>where
T: Freeze,
<T as DescContent>::OwnerType: Freeze,
<T as DescContent>::AreaType: Freeze,
<T as DescContent>::AuthorType: Freeze,
<T as DescContent>::PublicKeyType: Freeze,
impl<T> RefUnwindSafe for NamedObjectDescBuilder<T>where
T: RefUnwindSafe,
<T as DescContent>::OwnerType: RefUnwindSafe,
<T as DescContent>::AreaType: RefUnwindSafe,
<T as DescContent>::AuthorType: RefUnwindSafe,
<T as DescContent>::PublicKeyType: RefUnwindSafe,
impl<T> Send for NamedObjectDescBuilder<T>where
T: Send,
impl<T> Sync for NamedObjectDescBuilder<T>where
T: Sync,
impl<T> Unpin for NamedObjectDescBuilder<T>where
T: Unpin,
<T as DescContent>::OwnerType: Unpin,
<T as DescContent>::AreaType: Unpin,
<T as DescContent>::AuthorType: Unpin,
<T as DescContent>::PublicKeyType: Unpin,
impl<T> UnwindSafe for NamedObjectDescBuilder<T>where
T: UnwindSafe,
<T as DescContent>::OwnerType: UnwindSafe,
<T as DescContent>::AreaType: UnwindSafe,
<T as DescContent>::AuthorType: UnwindSafe,
<T as DescContent>::PublicKeyType: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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