pub struct ChannelPreviewRecord {
pub kind: ChannelKindRecord,
pub canonical_name: Option<String>,
pub key: Vec<u8>,
pub channel_id: Vec<u8>,
pub tint: Vec<u8>,
pub display_name: Option<String>,
pub max_flood_hops: Option<u8>,
pub region: Option<Vec<u8>>,
}Expand description
Safe, non-mutating preview of a channel the user is about to join.
key is secret membership material for a ChannelKindRecord::PrivateKey
channel: callers must store it with identity-key protection and must not
place it in ordinary application records.
Fields§
§kind: ChannelKindRecord§canonical_name: Option<String>Canonicalized (ASCII-lowercased) name for a named channel. The UI should show this when it differs from what the user typed, because it — not the input — is what determines the key.
key: Vec<u8>The 32-octet channel key.
channel_id: Vec<u8>The two-octet derived channel identifier. This is a hint, not an identity: distinct keys may derive the same value, and receivers resolve collisions by trial decryption.
tint: Vec<u8>Three octets for presentation — a deterministic colour for the channel. The first two are the identifier above.
display_name: Option<String>Suggested local display name from the invitation (n=), decoded.
max_flood_hops: Option<u8>Recommended flood-hop ceiling from the invitation (mh=).
region: Option<Vec<u8>>Recommended region from the invitation (r=), as a two-octet code.
Absent when the invitation named a region that does not parse.
Trait Implementations§
Source§impl Clone for ChannelPreviewRecord
impl Clone for ChannelPreviewRecord
Source§fn clone(&self) -> ChannelPreviewRecord
fn clone(&self) -> ChannelPreviewRecord
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for ChannelPreviewRecord
impl<UT> ConvertError<UT> for ChannelPreviewRecord
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for ChannelPreviewRecord
impl Debug for ChannelPreviewRecord
Source§impl<UT> FfiConverter<UT> for ChannelPreviewRecord
impl<UT> FfiConverter<UT> for ChannelPreviewRecord
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl<UT> Lift<UT> for ChannelPreviewRecord
impl<UT> Lift<UT> for ChannelPreviewRecord
Source§impl<UT> LiftRef<UT> for ChannelPreviewRecord
impl<UT> LiftRef<UT> for ChannelPreviewRecord
Source§impl<UT> LiftReturn<UT> for ChannelPreviewRecord
impl<UT> LiftReturn<UT> for ChannelPreviewRecord
Source§type ReturnType = <ChannelPreviewRecord as Lift<UT>>::FfiType
type ReturnType = <ChannelPreviewRecord as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
Source§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
Source§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
Source§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for ChannelPreviewRecord
impl<UT> Lower<UT> for ChannelPreviewRecord
type FfiType = <ChannelPreviewRecord as FfiConverter<UT>>::FfiType
fn lower(obj: Self) -> Self::FfiType
fn write(obj: Self, buf: &mut Vec<u8>)
Source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
Source§impl<UT> LowerError<UT> for ChannelPreviewRecord
impl<UT> LowerError<UT> for ChannelPreviewRecord
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for ChannelPreviewRecord
impl<UT> LowerReturn<UT> for ChannelPreviewRecord
Source§type ReturnType = <ChannelPreviewRecord as Lower<UT>>::FfiType
type ReturnType = <ChannelPreviewRecord as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl PartialEq for ChannelPreviewRecord
impl PartialEq for ChannelPreviewRecord
Source§impl<UT> TypeId<UT> for ChannelPreviewRecord
impl<UT> TypeId<UT> for ChannelPreviewRecord
impl Eq for ChannelPreviewRecord
impl StructuralPartialEq for ChannelPreviewRecord
Auto Trait Implementations§
impl Freeze for ChannelPreviewRecord
impl RefUnwindSafe for ChannelPreviewRecord
impl Send for ChannelPreviewRecord
impl Sync for ChannelPreviewRecord
impl Unpin for ChannelPreviewRecord
impl UnwindSafe for ChannelPreviewRecord
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.