Length

Trait Length 

Source
pub trait Length {
    // Required method
    fn length(&self) -> usize;
}
Expand description

Trait for determining the length of SMPP values.

§Implementation


struct Foo {
    a: u8,
    b: u16,
    c: u32,
}

impl Length for Foo {
    fn length(&self) -> usize {
        self.a.length() + self.b.length() + self.c.length()
    }
}

let foo = Foo {
    a: 0x01,
    b: 0x0203,
    c: 0x04050607,
};


assert_eq!(foo.length(), 7);

Required Methods§

Source

fn length(&self) -> usize

Implementations on Foreign Types§

Source§

impl Length for u8

Source§

fn length(&self) -> usize

Source§

impl Length for u16

Source§

fn length(&self) -> usize

Source§

impl Length for u32

Source§

fn length(&self) -> usize

Source§

impl<T: Length> Length for &[T]

Source§

fn length(&self) -> usize

Source§

impl<T: Length> Length for Option<T>

Source§

fn length(&self) -> usize

Source§

impl<T: Length> Length for Vec<T>

Available on crate feature alloc only.
Source§

fn length(&self) -> usize

Source§

impl<T: Length, const N: usize> Length for Vec<T, N>

Source§

fn length(&self) -> usize

Implementors§

Source§

impl Length for CommandId

Source§

impl Length for CommandStatus

Source§

impl Length for rusmpp_core::pdus::owned::Pdu

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::tlvs::borrowed::TlvValue<'_>

Source§

impl Length for TlvTag

Source§

impl Length for rusmpp_core::tlvs::owned::TlvValue

Available on crate feature alloc only.
Source§

impl Length for UdhId

Source§

impl Length for UdhValue

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::borrowed::DestAddress<'_>

Source§

impl Length for AddrSubunit

Source§

impl Length for AlertOnMessageDelivery

Source§

impl Length for Ansi41Specific

Source§

impl Length for BearerType

Source§

impl Length for BroadcastAreaFormat

Source§

impl Length for BroadcastAreaSuccess

Source§

impl Length for BroadcastChannelIndicator

Source§

impl Length for BroadcastMessageClass

Source§

impl Length for CongestionState

Source§

impl Length for DataCoding

Source§

impl Length for DeliveryFailureReason

Source§

impl Length for DestAddrNpResolution

Source§

impl Length for DestFlag

Source§

impl Length for DisplayTime

Source§

impl Length for DpfResult

Source§

impl Length for EncodingContentType

Source§

impl Length for ErrorCodeNetworkType

Source§

impl Length for GsmFeatures

Source§

impl Length for Indicator

Source§

impl Length for InterfaceVersion

Source§

impl Length for IntermediateNotification

Source§

impl Length for ItsReplyType

Source§

impl Length for LanguageIndicator

Source§

impl Length for MCDeliveryReceipt

Source§

impl Length for MessageState

Source§

impl Length for MessageType

Source§

impl Length for MessagingMode

Source§

impl Length for MoreMessagesToSend

Source§

impl Length for MsAvailabilityStatus

Source§

impl Length for MsValidityBehavior

Source§

impl Length for NetworkType

Source§

impl Length for Npi

Source§

impl Length for NumberOfMessages

Source§

impl Length for PayloadType

Source§

impl Length for Presentation

Source§

impl Length for PrivacyIndicator

Source§

impl Length for ReplaceIfPresentFlag

Source§

impl Length for Screening

Source§

impl Length for SetDpf

Source§

impl Length for SmeOriginatedAcknowledgement

Source§

impl Length for SubaddressTag

Source§

impl Length for Ton

Source§

impl Length for TypeOfMessage

Source§

impl Length for TypeOfNetwork

Source§

impl Length for UnitOfTime

Source§

impl Length for UnitsOfTime

Source§

impl Length for UssdServiceOp

Source§

impl Length for rusmpp_core::values::owned::DestAddress

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::command::owned::Command

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::AlertNotification

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BindReceiver

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BindReceiverResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BindTransceiver

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BindTransceiverResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BindTransmitter

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BindTransmitterResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BroadcastSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::BroadcastSmResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::CancelBroadcastSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::CancelSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::DataSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::DataSmResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::DeliverSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::DeliverSmResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::Outbind

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::QueryBroadcastSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::QueryBroadcastSmResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::QuerySm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::QuerySmResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::ReplaceSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::SubmitMulti

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::SubmitMultiResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::SubmitSm

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::pdus::owned::SubmitSmResp

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::tlvs::owned::Tlv

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::types::borrowed::AnyOctetString<'_>

Source§

impl Length for rusmpp_core::types::owned::AnyOctetString

Available on crate feature alloc only.
Source§

impl Length for ConcatenatedShortMessage8Bit

Available on crate feature alloc only.
Source§

impl Length for ConcatenatedShortMessage16Bit

Available on crate feature alloc only.
Source§

impl Length for Udh

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::owned::BroadcastAreaIdentifier

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::owned::DistributionListName

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::owned::MessagePayload

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::owned::ServiceType

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::owned::SmeAddress

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::owned::Subaddress

Available on crate feature alloc only.
Source§

impl Length for rusmpp_core::values::owned::UnsuccessSme

Available on crate feature alloc only.
Source§

impl Length for BroadcastContentType

Source§

impl Length for BroadcastFrequencyInterval

Source§

impl Length for BroadcastRepNum

Source§

impl Length for CallbackNumPresInd

Source§

impl Length for EsmClass

Source§

impl Length for ItsSessionInfo

Source§

impl Length for MsMsgWaitFacilities

Source§

impl Length for MsValidity

Source§

impl Length for MsValidityInformation

Source§

impl Length for NetworkErrorCode

Source§

impl Length for PriorityFlag

Source§

impl Length for RegisteredDelivery

Source§

impl Length for UserMessageReference

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::AlertNotification<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::BindReceiver<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::BindReceiverResp<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::BindTransceiver<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::BindTransceiverResp<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::BindTransmitter<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::BindTransmitterResp<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::CancelSm<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::Outbind<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::QueryBroadcastSm<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::QuerySm<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::QuerySmResp<'a>

Source§

impl<'a> Length for rusmpp_core::pdus::borrowed::ReplaceSm<'a>

Source§

impl<'a> Length for rusmpp_core::tlvs::borrowed::Tlv<'a>

Source§

impl<'a> Length for rusmpp_core::values::borrowed::BroadcastAreaIdentifier<'a>

Source§

impl<'a> Length for rusmpp_core::values::borrowed::DistributionListName<'a>

Source§

impl<'a> Length for rusmpp_core::values::borrowed::MessagePayload<'a>

Source§

impl<'a> Length for rusmpp_core::values::borrowed::ServiceType<'a>

Source§

impl<'a> Length for rusmpp_core::values::borrowed::SmeAddress<'a>

Source§

impl<'a> Length for rusmpp_core::values::borrowed::Subaddress<'a>

Source§

impl<'a> Length for rusmpp_core::values::borrowed::UnsuccessSme<'a>

Source§

impl<'a, const N: usize> Length for rusmpp_core::command::borrowed::Command<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::BroadcastSm<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::BroadcastSmResp<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::CancelBroadcastSm<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::DataSm<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::DataSmResp<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::DeliverSm<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::DeliverSmResp<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::QueryBroadcastSmResp<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::SubmitMulti<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::SubmitMultiResp<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::SubmitSm<'a, N>

Source§

impl<'a, const N: usize> Length for rusmpp_core::pdus::borrowed::SubmitSmResp<'a, N>

Source§

impl<const MIN: usize, const MAX: usize> Length for rusmpp_core::types::borrowed::COctetString<'_, MIN, MAX>

Source§

impl<const MIN: usize, const MAX: usize> Length for rusmpp_core::types::borrowed::OctetString<'_, MIN, MAX>

Source§

impl<const MIN: usize, const MAX: usize> Length for rusmpp_core::types::owned::COctetString<MIN, MAX>

Available on crate feature alloc only.
Source§

impl<const MIN: usize, const MAX: usize> Length for rusmpp_core::types::owned::OctetString<MIN, MAX>

Available on crate feature alloc only.
Source§

impl<const N: usize> Length for rusmpp_core::pdus::borrowed::Pdu<'_, N>

Source§

impl<const N: usize> Length for rusmpp_core::types::borrowed::EmptyOrFullCOctetString<'_, N>

Source§

impl<const N: usize> Length for rusmpp_core::types::owned::EmptyOrFullCOctetString<N>

Available on crate feature alloc only.