Struct cyfs_base::NamedObjectDescBuilder
source · 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>where
T::OwnerType: Clone,
T::AreaType: Clone,
T::AuthorType: Clone,
T::PublicKeyType: Clone,
impl<T: Clone + DescContent> Clone for NamedObjectDescBuilder<T>where T::OwnerType: Clone, T::AreaType: Clone, T::AuthorType: Clone, T::PublicKeyType: Clone,
source§fn clone(&self) -> NamedObjectDescBuilder<T>
fn clone(&self) -> NamedObjectDescBuilder<T>
Returns a copy 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 more