pub struct Interest {
pub session_id: TempSeq,
pub chunk: ChunkId,
pub prefer_type: ChunkCodecDesc,
pub referer: Option<String>,
pub from: Option<DeviceId>,
pub group_path: Option<String>,
}
Fields§
§session_id: TempSeq
§chunk: ChunkId
§prefer_type: ChunkCodecDesc
§referer: Option<String>
§from: Option<DeviceId>
§group_path: Option<String>
Trait Implementations§
Source§impl JsonCodec<Interest> for Interest
impl JsonCodec<Interest> for Interest
fn encode_json(&self) -> Map<String, Value>
fn decode_json(obj: &Map<String, Value>) -> BuckyResult<Self>
fn encode_string(&self) -> String
fn decode_string(value: &str) -> Result<T, BuckyError>
fn decode_value(value: &Value) -> Result<T, BuckyError>
fn encode_value(&self) -> Value
Source§impl<'de> RawDecodeWithContext<'de, &DatagramOptions> for Interest
impl<'de> RawDecodeWithContext<'de, &DatagramOptions> for Interest
fn raw_decode_with_context( buf: &'de [u8], options: &DatagramOptions, ) -> Result<(Self, &'de [u8]), BuckyError>
Source§impl RawEncodeWithContext<DatagramOptions> for Interest
impl RawEncodeWithContext<DatagramOptions> for Interest
fn raw_measure_with_context( &self, _options: &mut DatagramOptions, _purpose: &Option<RawEncodePurpose>, ) -> Result<usize, BuckyError>
fn raw_encode_with_context<'a>( &self, enc_buf: &'a mut [u8], options: &mut DatagramOptions, _purpose: &Option<RawEncodePurpose>, ) -> Result<&'a mut [u8], BuckyError>
fn raw_tail_encode_with_context<'a>( &self, buf: &'a mut [u8], context: &mut Context, purpose: &Option<RawEncodePurpose>, ) -> Result<&'a [u8], BuckyError>
Auto Trait Implementations§
impl Freeze for Interest
impl RefUnwindSafe for Interest
impl Send for Interest
impl Sync for Interest
impl Unpin for Interest
impl UnwindSafe for Interest
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