pub struct NamedObjectContext { /* private fields */ }
Implementations§
Source§impl NamedObjectContext
impl NamedObjectContext
pub fn new(obj_type: u16, obj_flags: u16) -> Self
pub fn obj_type_code(&self) -> ObjectTypeCode
pub fn obj_type(&self) -> u16
pub fn obj_flags(&self) -> u16
pub fn is_standard_object(&self) -> bool
pub fn is_core_object(&self) -> bool
pub fn is_decapp_object(&self) -> bool
pub fn with_crypto(&mut self) -> &mut Self
pub fn has_crypto(&self) -> bool
pub fn with_mut_body(&mut self) -> &mut Self
pub fn has_mut_body(&self) -> bool
pub fn with_desc_signs(&mut self) -> &mut Self
pub fn has_desc_signs(&self) -> bool
pub fn with_body_signs(&mut self) -> &mut Self
pub fn has_body_signs(&self) -> bool
pub fn with_nonce(&mut self) -> &mut Self
pub fn has_nonce(&self) -> bool
pub fn with_dec_id(&mut self) -> &mut Self
pub fn has_dec_id(&self) -> bool
pub fn with_ref_objects(&mut self) -> &mut Self
pub fn has_ref_objects(&self) -> bool
pub fn with_prev(&mut self) -> &mut Self
pub fn has_prev(&self) -> bool
pub fn with_create_timestamp(&mut self) -> &mut Self
pub fn has_create_time_stamp(&self) -> bool
pub fn with_create_time(&mut self) -> &mut Self
pub fn has_create_time(&self) -> bool
pub fn with_expired_time(&mut self) -> &mut Self
pub fn has_expired_time(&self) -> bool
pub fn with_owner(&mut self) -> &mut Self
pub fn has_owner(&self) -> bool
pub fn with_area(&mut self) -> &mut Self
pub fn has_area(&self) -> bool
pub fn with_public_key(&mut self) -> &mut Self
pub fn has_public_key(&self) -> bool
pub fn has_ext(&self) -> bool
pub fn cache_desc_content_size(&mut self, size: u16) -> &mut Self
pub fn get_desc_content_cached_size(&self) -> u16
pub fn body_context(&self) -> &NamedObjectBodyContext
pub fn mut_body_context(&mut self) -> &mut NamedObjectBodyContext
Trait Implementations§
Source§impl Clone for NamedObjectContext
impl Clone for NamedObjectContext
Source§fn clone(&self) -> NamedObjectContext
fn clone(&self) -> NamedObjectContext
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 moreSource§impl Debug for NamedObjectContext
impl Debug for NamedObjectContext
Source§impl<'de> RawDecode<'de> for NamedObjectContext
impl<'de> RawDecode<'de> for NamedObjectContext
fn raw_decode(buf: &'de [u8]) -> BuckyResult<(Self, &'de [u8])>
fn raw_decode_with_option( buf: &'de [u8], _opt: &RawDecodeOption, ) -> BuckyResult<(Self, &'de [u8])>
Source§impl<'de> RawDecodeWithContext<'de, &NamedObjectContext> for ObjectSigns
impl<'de> RawDecodeWithContext<'de, &NamedObjectContext> for ObjectSigns
fn raw_decode_with_context( buf: &'de [u8], ctx: &NamedObjectContext, ) -> BuckyResult<(Self, &'de [u8])>
Source§impl<'de, T> RawDecodeWithContext<'de, NamedObjectContext> for NamedObjectDesc<T>where
T: DescContent + RawDecode<'de>,
§NamedObjectDesc 的 解码
- ctx: NamedObjectContext 从上层 NamedObjectBase 里传入编码的上下文
- 通过 ctx 获取 Option 字段信息
impl<'de, T> RawDecodeWithContext<'de, NamedObjectContext> for NamedObjectDesc<T>where
T: DescContent + RawDecode<'de>,
§NamedObjectDesc 的 解码
- ctx: NamedObjectContext 从上层 NamedObjectBase 里传入编码的上下文
- 通过 ctx 获取 Option 字段信息
fn raw_decode_with_context( buf: &'de [u8], ctx: NamedObjectContext, ) -> BuckyResult<(Self, &'de [u8])>
Source§impl<'de> RawDecodeWithContext<'de, NamedObjectContext> for TypelessObjectDesc
§TypelessObjectDesc 解码
- [1] ctx 部分来自NamedObject里的ctx
- [2] 其余部分为desc本身的解码
impl<'de> RawDecodeWithContext<'de, NamedObjectContext> for TypelessObjectDesc
§TypelessObjectDesc 解码
- [1] ctx 部分来自NamedObject里的ctx
- [2] 其余部分为desc本身的解码
fn raw_decode_with_context( buf: &'de [u8], ctx: NamedObjectContext, ) -> BuckyResult<(Self, &'de [u8])>
Source§impl RawEncode for NamedObjectContext
impl RawEncode for NamedObjectContext
fn raw_measure(&self, _purpose: &Option<RawEncodePurpose>) -> BuckyResult<usize>
fn raw_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a mut [u8]>
fn raw_tail_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a [u8]>
fn raw_encode_to_buffer(&self) -> BuckyResult<Vec<u8>>
fn raw_hash_value(&self) -> BuckyResult<HashValue>
fn hash_buf(&self, encoded_buf: &[u8]) -> HashValue
fn raw_hash_encode(&self) -> BuckyResult<Vec<u8>>
Source§impl<O> RawEncodeWithContext<NamedObjectContext> for NamedObjectBase<O>where
O: ObjectType,
O::DescType: RawEncodeWithContext<NamedObjectContext>,
O::ContentType: RawEncode + BodyContent,
impl<O> RawEncodeWithContext<NamedObjectContext> for NamedObjectBase<O>where
O: ObjectType,
O::DescType: RawEncodeWithContext<NamedObjectContext>,
O::ContentType: RawEncode + BodyContent,
fn raw_measure_with_context( &self, ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<usize>
fn raw_encode_with_context<'a>( &self, buf: &'a mut [u8], ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a mut [u8]>
fn raw_tail_encode_with_context<'a>( &self, buf: &'a mut [u8], context: &mut Context, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a [u8]>
Source§impl<T> RawEncodeWithContext<NamedObjectContext> for NamedObjectDesc<T>where
T: DescContent + RawEncode,
§NamedObjectDesc 的 编码
- ctx: NamedObjectContext 从上层 NamedObjectBase 里传入编码的上下文
- 通过 ctx 压缩Option字段的编码
impl<T> RawEncodeWithContext<NamedObjectContext> for NamedObjectDesc<T>where
T: DescContent + RawEncode,
§NamedObjectDesc 的 编码
- ctx: NamedObjectContext 从上层 NamedObjectBase 里传入编码的上下文
- 通过 ctx 压缩Option字段的编码
fn raw_measure_with_context( &self, ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<usize>
fn raw_encode_with_context<'a>( &self, buf: &'a mut [u8], ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a mut [u8]>
fn raw_tail_encode_with_context<'a>( &self, buf: &'a mut [u8], context: &mut Context, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a [u8]>
Source§impl RawEncodeWithContext<NamedObjectContext> for ObjectSigns
impl RawEncodeWithContext<NamedObjectContext> for ObjectSigns
fn raw_measure_with_context( &self, ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<usize>
fn raw_encode_with_context<'a>( &self, buf: &'a mut [u8], ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a mut [u8]>
fn raw_tail_encode_with_context<'a>( &self, buf: &'a mut [u8], context: &mut Context, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a [u8]>
Source§impl RawEncodeWithContext<NamedObjectContext> for TypelessObjectDesc
§TypelessObjectDesc 编码
- [1] ctx 部分来自NamedObject里的ctx
- [2] 其余部分为desc本身的编码
impl RawEncodeWithContext<NamedObjectContext> for TypelessObjectDesc
§TypelessObjectDesc 编码
- [1] ctx 部分来自NamedObject里的ctx
- [2] 其余部分为desc本身的编码
fn raw_measure_with_context( &self, ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<usize>
fn raw_encode_with_context<'a>( &self, buf: &'a mut [u8], _ctx: &mut NamedObjectContext, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a mut [u8]>
fn raw_tail_encode_with_context<'a>( &self, buf: &'a mut [u8], context: &mut Context, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a [u8]>
Auto Trait Implementations§
impl Freeze for NamedObjectContext
impl RefUnwindSafe for NamedObjectContext
impl Send for NamedObjectContext
impl Sync for NamedObjectContext
impl Unpin for NamedObjectContext
impl UnwindSafe for NamedObjectContext
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<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
impl<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
fn decode_from_file( file: &Path, buf: &'de mut Vec<u8>, ) -> Result<(D, usize), BuckyError>
Source§impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
fn suggest_buffer_size(&self) -> Result<usize, BuckyError>
fn encode<'a>( &self, buf: &'a mut [u8], _is_compress: bool, ) -> Result<&'a mut [u8], BuckyError>
fn encode_to_writer( &self, writer: impl Write, is_compress: bool, ) -> BuckyResult<usize>
fn encode_to_file(&self, file: &Path, is_compress: bool) -> BuckyResult<usize>
fn encode_to_vec(&self, is_compress: bool) -> BuckyResult<Vec<u8>>
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